Conditionally switch to insert mode on snippet expansion
If already in insert (or emacs) state, don't switch mode when expanding a yasnippet snippet.
This commit is contained in:
parent
3c8a2a655f
commit
2772ca8e70
1 changed files with 2 additions and 0 deletions
|
@ -312,5 +312,7 @@ is."
|
|||
(defun region-end () evil-visual-end))
|
||||
(funcall orig-fn no-condition)))
|
||||
(when (and (bound-and-true-p evil-local-mode)
|
||||
(not (or (evil-emacs-state-p)
|
||||
(evil-insert-state-p)))
|
||||
(yas-active-snippets))
|
||||
(evil-insert-state +1)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue