Added evil numbers to emacs config

This commit is contained in:
Jaden Provost Maxwell-Comfort 2024-05-16 19:56:22 -07:00
parent 6d15eaae89
commit 28c4e0f762

View File

@ -286,7 +286,7 @@ Evil is a package that adds vim keybindings to Emacs.
(evil-set-initial-state 'dashboard-mode 'normal))
#+end_src
** Evil Collection
*** Evil Collection
Evil collection is a package that replaces the bad ~evil-want-keybinding~ keybindings.
@ -296,6 +296,20 @@ Evil collection is a package that replaces the bad ~evil-want-keybinding~ keybin
:config (evil-collection-init))
#+end_src
*** Evil Numbers
The /Evil Numbers/ package implements the ability to increment or decrement numbers as you would with vim using ~C-a~ and ~C-x~.
#+begin_src emacs-lisp
(use-package evil-numbers
:after evil
:config
(evil-define-key '(normal visual) 'global (kbd "C-c =") 'evil-numbers/inc-at-pt)
(evil-define-key '(normal visual) 'global (kbd "C-c -") 'evil-numbers/dec-at-pt)
(evil-define-key '(normal visual) 'global (kbd "C-c C-=") 'evil-numbers/inc-at-pt-incremental)
(evil-define-key '(normal visual) 'global (kbd "C-c C--") 'evil-numbers/dec-at-pt-incremental))
#+end_src
** Undo-Tree
Undo tree's use is self explanatory. While the built-in Emacs undo system is fine for me, *undo-tree* is required as it fixes an issue with evil where you can't redo.