Sublime Forum

Why snippet not working

#1

I have saved my snippet as below:

<snippet>
    <content><![CDATA[
(function($) {
    $(document).ready(function() {

    $('${1:code here}'');

    });
})(jQuery)
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>siafjquery</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <!-- <scope>source.python</scope> -->
</snippet>
<!--  -->

But it’s not working,

Thoughts?

0 Likes

#2

put a \ before the $ in function($)
and install https://packagecontrol.io/packages/PackageDev to see the problem highlighted nicely :wink:

1 Like

#3

Thanks for your quick reply, I was suspecting $ too, it’s the culprit since others were working without it. But didn’t know how to fix.

Again thanks! :slight_smile:

1 Like