Last active
October 22, 2015 19:17
-
-
Save paxperscientiam/fa85f7931afc71ac5767 to your computer and use it in GitHub Desktop.
Just a bit of emacs lisp that maps both `kill-ring-save' and `simpleclip-copy' to M-w
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'simpleclip) | |
(simpleclip-mode 1) | |
(define-key global-map (kbd "M-w") | |
(defun kill-save-copy-to-clipboard () | |
"The function kill-save-copy-to-clipboard uses `simpleclip-mode' to | |
kill-ring-save and copy to osx clipboard using a common shortcut." | |
(interactive) | |
(if (use-region-p) | |
(kill-ring-save (region-beginning) (region-end) | |
(simpleclip-copy (region-beginning) (region-end)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment