Snippet syntax doesn't accept " as a trigger
Bug #1155996 reported by
DavidBriscoe
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UltiSnips |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
I have a python snippet for multi-line strings:
snippet " "triple-quoted string"
"""
${1:doc}
"""
endsnippet
The syntax colours " " as a string (snipString) and triple-quoted string" (including that trailing quote) as the trigger (snipStart). The snippet works as expected.
I'm using e4274950abd73ac
I don't know vim syntax files very well, but I think you could create a new syntax group for docstrings that must be at end-of-line. I've attached a patch that does that. It works in my use case and appears to be correct elsewhere. snipString is also used in global, but I don't understand why (and whether that should be a snipDocString too).
To post a comment you must log in.
Thanks for the patch. I applied it and pushed again.
I have no idea if the syntax file could be improved - it was a contribution and i only changed very minor things in it as I have little knowledge about syntax files.