diff --git a/init-package/init-evil.el b/init-package/init-evil.el index 761c844e6..1148bd27f 100644 --- a/init-package/init-evil.el +++ b/init-package/init-evil.el @@ -24,3 +24,10 @@ (add-hook 'evil-emacs-state-entry-hook (lambda () (add-hook 'post-command-hook 'evil-emacs-state-2-evil-normal-state))) +;; same thing for motion state +(defun evil-motion-state-2-evil-normal-state () + (evil-normal-state) + (remove-hook 'post-command-hook 'evil-motion-state-2-evil-normal-state)) +(add-hook 'evil-motion-state-entry-hook + (lambda () + (add-hook 'post-command-hook 'evil-motion-state-2-evil-normal-state)))