feature/file-templates: only switch to insert mode if the current field isn't $0
This commit is contained in:
parent
02bcada450
commit
6aabc32245
1 changed files with 4 additions and 1 deletions
|
@ -26,7 +26,10 @@
|
||||||
(unless yas-minor-mode (yas-minor-mode-on))
|
(unless yas-minor-mode (yas-minor-mode-on))
|
||||||
(when (and yas-minor-mode
|
(when (and yas-minor-mode
|
||||||
(yas-expand-snippet (yas-lookup-snippet key mode t))
|
(yas-expand-snippet (yas-lookup-snippet key mode t))
|
||||||
(and (featurep 'evil) evil-mode))
|
(and (featurep 'evil) evil-mode)
|
||||||
|
(and yas--active-field-overlay
|
||||||
|
(overlay-buffer yas--active-field-overlay)
|
||||||
|
(overlay-get yas--active-field-overlay 'yas--field)))
|
||||||
(evil-initialize-state 'insert))))
|
(evil-initialize-state 'insert))))
|
||||||
|
|
||||||
(defun +file-templates|add (regexp trigger mode &optional project-only-p)
|
(defun +file-templates|add (regexp trigger mode &optional project-only-p)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue