hsnips
hsnips copied to clipboard
Can't trigger snippet with specific regular expression
Snippet with specific regular expression triggers can't be triggered by specific strings satisfying regex.
This is the first example I found:

In further testing more examples were found:
cpp.hsnips
snippet `a ((\W\S+)|(\w\S*)) ((\W\S+)|(\w\S*))`
test
endsnippet
test.cpp
a aa aa
In this example, a aa a
can trigger the snippet and to type in a aa aaa
and delete the last character can also trigger the snippet.
cpp.hsnips
snippet `a \w\S`
test
endsnippet
test.cpp
a a?
In this example, a a.
a a@
a a-
a a<
can trigger the snippet.
All these examples were found using my computer, I'm not sure wether it is common and repeatable.