0

How to insert a $ symbol into a template snippet?

Jorge González 7 years ago updated 7 years ago 3
I read the github repository, and now I want to know how to instert a '$' symbol into a template snippet, I tired using '\$' like TextMate help say, but it doesn't work, any ideas?
Thanks :D

P.S: Excellent app! ;)
Hello,

the snippets are in JSON format.

JSON is pretty liberal regarding string escapes: The only characters you must escape are '\', '"', and control codes (anything less than U+0020).

So you can just use the $ symbol as is in a JSON string.
Ok, scratch that... use "\\$". The "\\" is necessary because you need to escape the backslash for JSON.
Thanks! it works now!