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)?