From 2baadca418880d5e4a906643b70e64245c2c286e Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Tue, 29 Nov 2022 17:29:53 -0800 Subject: [PATCH] Fix bugs with evil config --- init.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/init.el b/init.el index 7a426c3..bf4a269 100644 --- a/init.el +++ b/init.el @@ -80,8 +80,11 @@ (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))) +(use-package evil + :init + (setq evil-mode-beyond-eol t) + (setq evil-mode-fine-undo t) + (setq evil-default-state 'emacs) + :config + (evil-set-initial-state 'prog-mode 'normal) + (evil-mode +1))