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))