Sublime Forum

New Snippet "$" not printing there must be some escaping method

#1
<snippet>
	<content><![CDATA[
     ${1:$this->}${2:name}
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>t</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>source.php</scope>
</snippet>

$ is not printing:

t+TAB

I want this:

this->name

0 Likes

#2

Hi was able to fix it, one \ did the magic:

<snippet>
	<content><![CDATA[
${1:\$this->}${2:name}
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>t</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>source.php</scope>
</snippet>
0 Likes