Sublime Forum

Noob question : snippets not working?

#1

I am trying to set up sublime text 2 with PHP, but I am having some trouble getting the snippets to work. I have loaded a PHP project and see that the syntax is correctly set to PHP. When I go to preferences -> browse -> packages _>php , I can see a number of PHP snippets that I am unable to activate including $_files $get ,$post. As far as I can tell, the tab trigger for these are '$

$_ source.php COOKIE'…']

but this does not generate any snippets being displayed, when I try it in a php file.

Can anyone give me advice on what to do next?

Thank you,

Bill.

0 Likes

#2

Have you checked you dont have any unescaped ‘$’ signs in your snippets , for example if its a jQuery snippet. From the manual:

[quote]Keep the following in mind when writing your own snippets:

If you want the get a literal $, you have to escape it like this: $.
When writing a snippet that contains indentation, always use tabs. The tabs will be transformed into spaces when the snippet is inserted if the option translateTabsToSpaces is set to true.
The content must be included in a section. Snippets won’t work if you don’t do this![/quote]

sublimetext.info/docs/en/extensi … ppets.html

0 Likes