I'm going to assume you want a snippet to complete to what's shown in the screenshot. In that case your “code” does not work because you're escaping the $
, which makes your snippet useless.
If you want to get a literal $
, you have to escape it like this: \$
.
Instead, you want to add another backslash to expand the snippet with two backslashes in place.
This following will expand with \\
and tab-stops in place:
<snippet>
<content><![CDATA[
"\\\\${1:folder1}\\\\${2:folder2}\\\\${3:filename}.jpg"
]]></content>
</snippet>
Regarding your second issue: there are two ways to create tab-stops, with default values (e.g. ${1:default_value}
and without (e.g. $1
). So, you should use ${1:0}
if you want it to contain 0
by default.