diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2022-07-28 18:08:29 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2022-07-28 18:08:29 +0100 |
commit | efa73c23ea919831c77f7e4fee1d845653798266 (patch) | |
tree | 28d568909d979d4fb7ea3de50dabc992ad92fa8d /Emacs/.config/emacs/config.org | |
parent | 5bb16f1ccae7af462cde41f51531d042d77b7256 (diff) | |
download | dotfiles-efa73c23ea919831c77f7e4fee1d845653798266.tar.gz dotfiles-efa73c23ea919831c77f7e4fee1d845653798266.tar.bz2 dotfiles-efa73c23ea919831c77f7e4fee1d845653798266.zip |
(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.
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r-- | Emacs/.config/emacs/config.org | 23 |
1 files changed, 7 insertions, 16 deletions
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 |