mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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:
@ -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)))
|
||||
|
Reference in New Issue
Block a user