At the YASnippet site I noticed the following description of yas/triggers-in-field
:
If non-nil,
yas/next-field-key
can trigger stacked expansions, that is a snippet expansion inside another snippet expansion. Otherwise,yas/next-field-key
just tries to move on to the next field.
I'm not clear how to make this happen.
I assumed that after I set: #expand-env: ((yas/triggers-in-field #t))
, whenever I typed an abbrev in a field and pressed Tab it would expand, however that's not the case.
yas/triggers-in-field
is a variable. Per default it is set to nil.
Its docstring says:
If non-nil, `yas/next-field-key' can trigger stacked expansions.
Otherwise, `yas/next-field-key' just tries to move on to the next field
Thus, to enable stacked expansions you have to set the variable to a non-nil value such as t
. If you want this setting permanent put the following in your .emacs:
(setq yas/triggers-in-field t); Enable nested triggering of snippets
You can read about other customizable YASnippet variables
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With