Decouple doom/escape & evil

This commit is contained in:
Henrik Lissner 2018-01-06 03:00:45 -05:00
parent a88cb1e4eb
commit 60cded00e6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 10 additions and 5 deletions

View file

@ -88,6 +88,15 @@
;; --- evil hacks -------------------------
(advice-add #'evil-force-normal-state :after #'doom/escape)
(defun +evil|disable-highlights ()
"Disable ex search buffer highlights."
(when (evil-ex-hl-active-p 'evil-ex-search)
(evil-ex-nohighlight)
t))
(add-hook 'doom-escape-hook #'+evil|disable-highlights)
(defun +evil*restore-normal-state-on-windmove (orig-fn &rest args)
"If in anything but normal or motion mode when moving to another window,
restore normal mode. This prevents insert state from bleeding into other modes