From efa73c23ea919831c77f7e4fee1d845653798266 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 28 Jul 2022 18:08:29 +0100 Subject: (Emacs)~evil packages to hook to evil-mode-hook Instead of running the mode itself, hook to every time we run evil mode to make it easier to see load flow. --- Emacs/.config/emacs/config.org | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'Emacs/.config/emacs/config.org') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index b4d0597..c103529 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -329,18 +329,14 @@ Setup the evil package, with some opinionated keybindings: *** Evil surround #+begin_src emacs-lisp (use-package evil-surround - :after evil - :config - (global-evil-surround-mode)) + :hook (evil-mode-hook . evil-surround-mode)) #+end_src *** Evil commentary #+begin_src emacs-lisp (use-package evil-commentary - :after evil - :config - (evil-commentary-mode)) + :hook (evil-mode-hook . evil-commentary-mode)) #+end_src -*** Evil mc +*** Evil multi cursor Setup for multi cursors in Evil mode. Don't let evil-mc setup it's own keymap because it uses 'gr' as its prefix, which I don't like. @@ -349,7 +345,7 @@ which is bound to 'gz'. Define a function =dx:evil-mc-cursor-here= which pauses cursors upon placing a cursor at the current position. #+begin_src emacs-lisp (use-package evil-mc - :after evil + :hook (evil-mode-hook . evil-mc-mode) :init (setq-default evil-mc-key-map nil) :general @@ -363,15 +359,10 @@ which pauses cursors upon placing a cursor at the current position. "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 + "z" #'evil-mc-make-cursor-here "r" #'evil-mc-resume-cursors - "s" #'evil-mc-pause-cursors) - :config - (global-evil-mc-mode +1) - (defun +dx/evil-mc-cursor-here () - (interactive) - (evil-mc-make-cursor-here) - (evil-mc-pause-cursors))) + "s" #'evil-mc-pause-cursors + "u" #'evil-mc-undo-last-added-cursor)) #+end_src *** Evil collection -- cgit v1.2.3-13-gbd6f