Search code examples
vimultisnips

How to expand the snippet with only part of the trigger?


I have vim with UltiSnips and it's working but only if I write the whole trigger. Is there a way to expand the snippet writing only a part of the trigger? I used to work with SnipMate and that works.

e.g.: If I have a trigger like follows:

snippet someTrigger
blah blah
endsnippet

It expand the snippet when I type:

someTrigger<tab>

But it doesn't when I type

some<tab>

Solution

  • Ultisnips also offers an API usually mapped to <C-Tab> UltiSnips#ListSnippets(), you should use that in case you want to avoid typing the entire snippet name, although the chances of clashes will be more.