diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2022-01-06 00:42:46 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2022-01-06 00:42:46 +0000 |
commit | da77d7408d16fdea95026d2baf5ba3bc3c785814 (patch) | |
tree | 17077908d2238fd7e17e36a9bd3ec0707e32b1aa /Emacs/.config/emacs/config.org | |
parent | 25930bcd7c39059fc26a7c2827b655fa5333bf36 (diff) | |
download | dotfiles-da77d7408d16fdea95026d2baf5ba3bc3c785814.tar.gz dotfiles-da77d7408d16fdea95026d2baf5ba3bc3c785814.tar.bz2 dotfiles-da77d7408d16fdea95026d2baf5ba3bc3c785814.zip |
(Emacs)~evil-mc definition emacs->general
The keybindings used to use :bind, which relies on the
underlying (define-key) mechanism of Emacs. However, as general is
loaded beforehand and it provides a ton of useful wrappers, let's use
those instead.
Makes the code look nicer as well.
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r-- | Emacs/.config/emacs/config.org | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index b57f841..0e7b02a 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -418,21 +418,23 @@ which pauses cursors upon placing a cursor at the current position. #+begin_src emacs-lisp (use-package evil-mc :after evil - :bind (("M-p" . evil-mc-skip-and-goto-prev-cursor) - :map +dx:evil-mc-map - ("q" . evil-mc-undo-all-cursors) - ("d" . evil-mc-make-and-goto-next-match) - ("j" . evil-mc-make-cursor-move-next-line) - ("k" . evil-mc-make-cursor-move-prev-line) - ("j" . evil-mc-make-cursor-move-next-line) - ("m" . evil-mc-make-all-cursors) - ("z" . +dx/evil-mc-cursor-here) - ("r" . evil-mc-resume-cursors) - ("s" . evil-mc-pause-cursors)) + :general + (general-nmap ("M-p" evil-mc-skip-and-goto-prev-cursor)) + (dx:evil-mc-map + ("q" . evil-mc-undo-all-cursors) + ("d" . evil-mc-make-and-goto-next-match) + ("j" . evil-mc-make-cursor-move-next-line) + ("k" . evil-mc-make-cursor-move-prev-line) + ("j" . evil-mc-make-cursor-move-next-line) + ("m" . evil-mc-make-all-cursors) + ("z" . +dx/evil-mc-cursor-here) + ("r" . evil-mc-resume-cursors) + ("s" . evil-mc-pause-cursors)) :init (setq evil-mc-key-map nil) - (define-prefix-command '+dx:evil-mc-map) - (bind-key "gz" +dx:evil-mc-map evil-normal-state-map) + (general-create-definer dx:evil-mc-map + :states 'normal + :prefix "gz") :config (global-evil-mc-mode +1) (defun +dx/evil-mc-cursor-here () |