feature/evil: refactor evil-force-normal-state advice into +evil-esc-hook

This commit is contained in:
Henrik Lissner 2017-05-07 19:12:48 +02:00
parent 69f6eab913
commit cce294fcf6
7 changed files with 29 additions and 16 deletions

View file

@ -55,7 +55,7 @@
:v "<tab>" #'+snippets/expand-on-region))
;; Exit snippets on ESC in normal mode
(advice-add #'evil-force-normal-state :before #'yas-exit-all-snippets)
(add-hook '+evil-esc-hook #'yas-exit-all-snippets)
;; Once you're in normal mode, you're out
(add-hook 'evil-normal-state-entry-hook #'yas-abort-snippet)
;; Strip out whitespace before a line selection