From 28c4e0f7625a808883ba5ea54d847f2f7f8baa4e Mon Sep 17 00:00:00 2001 From: Jaden Provost Maxwell-Comfort Date: Thu, 16 May 2024 19:56:22 -0700 Subject: [PATCH] Added evil numbers to emacs config --- .emacs.d/config.org | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.emacs.d/config.org b/.emacs.d/config.org index 1ea9583..9834947 100644 --- a/.emacs.d/config.org +++ b/.emacs.d/config.org @@ -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.