Home Download Buy Blog Forum Support

How to find a bad snippet

How to find a bad snippet

Postby jasong01 on Sun Aug 29, 2010 11:58 pm

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:
Code: Select all
<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: Select all
<?php if (condition): ?>
   
<?php endif ?>


I checked my php if snippet file to see if the scope was wrong, and it looks like this:
Code: Select all
<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
jasong01
 
Posts: 3
Joined: Sun Aug 29, 2010 11:50 pm

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 33 guests