0

I can't seem to use spaces in snippets at all. Ultisnips throws errors on the following:

snippet 'dv(?=[ \n])' "derivative" rA 2
\dv{$1}{$2}$0
endsnippet

My goal is to expand the snippet automatically if and only if dv precedes a space or newline, without removing the space or newline. Whenever I try to insert a space in any snippet, UltiSnips throws

UltiSnips.snippet.source.file.base.SnippetSyntaxError: Invalid multiword trigger: ''dv(?= )' "derivative" rA 2' in ~/.vim/UltiSnips/tex.snippets:23

So the issue seems to be that "multi-word triggers" aren't allowed. Is there a reason for this, and is there a workaround (that doesn't involve a negative lookahead for every character that isn't a space or newline)?

1 Answers1

-1

me from yesterday.

The issue is that the priority was improperly placed, that is, the previous line should have 'priority 2'. This has nothing to do with being unable to use spaces in snippets.