Escaping the $ character in snippets

There is an "Delimiter" attribute defined for a Code element. This defaults to $ but you can set it to a different character like ~ or so.

...

<Snippet>
<Code Language="JavaScript" Delimiter="~"><![CDATA[(function ($) {
    $(document).ready(function () {

    });
})(jQuery);]]></Code>
</Snippet>

...


This is the right way for Visual Studio Code: \\$.

This makes the $ a literal part of the snippet rather than the start of a $-prefixed construct.


To have a literal $ try doubling it: $$


Although the jQuery response is valid, it's a nicer syntax to use the $ notation.

I've found an answer: Making the $ character a literal with a default value of $.

<Literal Editable="true">

<ID>dollar</ID> <ToolTip>replace the dollar sign character</ToolTip> <Default>$</Default> <Function> </Function> </Literal>