gillescastel / latex-snippets

Vim + LaTeX snippets setup
MIT License
1.05k stars 201 forks source link

Escape $ in snippet bodies #21

Closed smjonas closed 2 years ago

smjonas commented 2 years ago

For some reason UltiSnips insert these snippets without any problems, however the documentation (:h UltiSnips-character-escaping) says this:

 4.1.4 Character Escaping:                     *UltiSnips-character-escaping*

In snippet definitions, the characters '`', '{', '$' and '\' have special
meaning. If you want to insert one of these characters literally, escape them
with a backslash, '\'.

So I think it's better to escape the $s :)

smjonas commented 2 years ago

Escaping the characters is not necessary, as explained here: https://github.com/SirVer/ultisnips/issues/1437