refactor: shorten advice definition
This commit is contained in:
parent
1325a53afd
commit
c0e00547d5
1 changed files with 1 additions and 4 deletions
|
|
@ -2230,10 +2230,7 @@ If there are any trailing newlines in the snippet file, they will be inserted wh
|
|||
When editing a snippet, the binding =C-c C-t= can be used to test it in a fresh buffer. This is very useful, but with Evil it has the issue of leaving the editor in normal state, when snippets are designed to be expanded in insert state.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defadvice! ~/yas-tryout-insert-state (&rest _)
|
||||
"Switch to Insert state when trying out a snippet."
|
||||
:after #'yas-tryout-snippet
|
||||
(evil-insert-state))
|
||||
(advice-add #'yas-tryout-snippet :after #'evil-insert-state)
|
||||
#+end_src
|
||||
|
||||
*** Creating New Snippets
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue