Last active
October 12, 2015 19:27
-
-
Save zkat/4075454 to your computer and use it in GitHub Desktop.
mouse-copy keyboard-based replacement
This file contains hidden or 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
| ;; Somewhat similar to mouse-copy functionality, but no rat involved | |
| (defun save-current-point () | |
| (interactive) | |
| (point-to-register 'p) | |
| (message "Current point saved")) | |
| (defun load-last-point () | |
| (interactive) | |
| (jump-to-register 'p)) | |
| (defun yank-to-last-point-and-indent () | |
| (interactive) | |
| (load-last-point) | |
| (yank) | |
| (paredit-backward) | |
| (indent-sexp)) | |
| ;; Suggested bindings | |
| (global-set-key (kbd "C-M-s") 'save-current-point) | |
| (global-set-key (kbd "C-c p") 'load-last-point) | |
| (global-set-key (kbd "C-M-y") 'yank-to-last-point-and-indent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment