Home Download Buy Blog Forum Support

noob question : snippets not working?

noob question : snippets not working?

Postby bill on Wed Oct 03, 2012 9:06 pm

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 '$_'


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,

Posts: 1
Joined: Wed Oct 03, 2012 9:03 pm

Re: noob question : snippets not working?

Postby pickledegg on Mon Nov 12, 2012 8:56 am

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

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 <![CDATA[…]]> section. Snippets won’t work if you don’t do this!

http://sublimetext.info/docs/en/extensi ... ppets.html
Posts: 5
Joined: Tue Oct 30, 2012 11:02 am

Return to General Discussion

Who is online

Users browsing this forum: gmcintire and 18 guests