8

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.

BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
qubital
  • 1,064
  • 9
  • 14

1 Answers1

8

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

BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
N.N.
  • 8,336
  • 12
  • 54
  • 94