Sublime Forum

Bug in snippet code?

#1

I made a snippet for defining a function in Haskell. Everything works well, with one exception:

If I use the snippet

<snippet> <content><![CDATA[ ${0:f} :: $1 ${0:f} $2 = $3]]></content> </snippet>
everything works correctly. However, I don’t want the space in front of the function name, so I remove it:

<content><![CDATA[${0:f} :: $1

When I now insert the macro everything still seems to work, but after changing the function name and pressing tab a tab character is inserted instead of jumping to the next insertion point. As long as any other character precedes the snippet it works correctly. This also happens to be the case in all the other predefined snippets (if, while, class, etc.). Is there a workaround for this or is it a bug that has to be fixed?

0 Likes

#2

Good find - this will be fixed in the next beta, no eta yet though.

0 Likes

#3

Thanks for the fix jps :sunglasses:

0 Likes