I recently switched most of my development to Django, and have a small problem with my snippets.
I have a django template snippet for if (found on these boards), that looks like this:
<snippet>
<content><![CDATA[{% if $1 %}
$2
{% endif %}]]></content>
<tabTrigger>if</tabTrigger>
<scope>text.html.django</scope>
<description>if</description>
</snippet>
But when I attempt to trigger it inside an html(django) environment, it prints this:
[code]<?php if (condition): ?>
<?php endif ?>[/code]I checked my php if snippet file to see if the scope was wrong, and it looks like this:
<snippet>
<content><![CDATA[if (${1:condition}) {
${0:# code...}
}]]></content>
<tabTrigger>if</tabTrigger>
<scope>source.php</scope>
<description>if …</description>
</snippet>
Deleting this existing PHP snippet doesn’t solve the problem, so I think I have a bad snippet floating around somewhere. Any suggestions on how to find it?
One last thing: the if snippet for Python works just fine.
Edit: Adding a z_ to the django package folder fixes it… of course, I’d still like to fix this the right way.
Thanks,
- Jason