feature/evil: switch to initial state on change window

This used to change to normal mode, but now it respects the buffer's
initial state.
This commit is contained in:
Henrik Lissner 2018-02-02 14:52:18 -05:00
parent eaeb495b18
commit b9d8116734
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 8 additions and 8 deletions

View file

@ -94,8 +94,8 @@
(add-hook 'after-save-hook #'+evil|save-buffer)
;; Make ESC (from normal mode) the universal escaper. See `doom-escape-hook'.
(advice-add #'evil-force-normal-state :after #'doom/escape)
;; Ensure buffer is in normal mode when we leave it and return to it.
(advice-add #'windmove-do-window-select :around #'+evil*restore-normal-state-on-windmove)
;; Ensure buffer is in initial mode when we leave it and return to it.
(advice-add #'windmove-do-window-select :around #'+evil*restore-initial-state-on-windmove)
;; Don't move cursor when indenting
(advice-add #'evil-indent :around #'+evil*static-reindent)
;; monkey patch `evil-ex-replace-special-filenames' to add more ex