diff options
| -rw-r--r-- | .config/emacs/init.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 4018538..4c2b383 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -107,6 +107,11 @@ :states '(insert normal) "C-z" #'evil-escape)) +(defun run-q-macro (n) + "Run the macro stored on the 'q' key `N' times." + (interactive "p") + (evil-execute-macro n "@q")) + ;; Sane key-binding management. (use-package general :after evil @@ -117,9 +122,8 @@ :states 'normal "C-s" #'save-buffer "C-e" #'evil-end-of-line - "C-2" (lambda (n) - (interactive "p") - (evil-execute-macro n "@q"))) + "C-2" #'run-q-macro + "C-@" #'run-q-macro) ;; And being cheeky with a C-s for saving even in insert mode. (general-define-key |
