Install evil mode

This commit is contained in:
outfoxxed 2022-11-29 00:55:04 -08:00
parent 1084109b9f
commit f595a7f8e8
No known key found for this signature in database
GPG key ID: 5775F651AC84FFE6

11
init.el
View file

@ -23,7 +23,7 @@
(global-display-line-numbers-mode +1) (global-display-line-numbers-mode +1)
;; Highlight current line ;; Highlight current line
(global-hl-line-mode 1) (global-hl-line-mode +1)
;; Replace yes/no prompts with y/n prompts ;; Replace yes/no prompts with y/n prompts
(fset #'yes-or-no-p #'y-or-n-p) (fset #'yes-or-no-p #'y-or-n-p)
@ -65,7 +65,7 @@
;; Use-Package ;; Use-Package
(straight-use-package 'use-package) (straight-use-package 'use-package)
(setq straight-use-package-by-default +1) (setq straight-use-package-by-default t)
;; Avy (jump to char) ;; Avy (jump to char)
(use-package avy (use-package avy
@ -78,3 +78,10 @@
;; Rainbow-Mode (show hex strings in color) ;; Rainbow-Mode (show hex strings in color)
(use-package rainbow-mode) (use-package rainbow-mode)
;; Evil (Vim Emulation)
(use-package evil)
(setq evil-move-beyond-eol t)
(setq evil-want-fine-undo t) ;; multi step undo in insert mode
(add-hook 'prog-mode-hook (lambda () (evil-mode +1)))
(add-hook 'change-major-mode-hook (lambda () (evil-mode -1)))