Home Download Buy Blog Forum Support

PHP filetype using HTML snippets

PHP filetype using HTML snippets

Postby dzdrazil on Mon Oct 04, 2010 2:09 pm

I'm not sure exactly when (I've been working on other languagues for awhile) but I'm guessing around the time that I updated to 1.4, all PHP snippets fail to work in PHP files (yes, the filetype is loaded as PHP in the bottom-right corner).

Instead, any HTML snippet seems to work fine. Also, if working in another language file (i.e. java) the respective snippets work fine.

Anyone else have this problem or can shed light on a fix?
dzdrazil
 
Posts: 3
Joined: Wed Sep 08, 2010 12:57 pm

Re: PHP filetype using HTML snippets

Postby jps on Tue Oct 05, 2010 12:19 pm

The php snippets should be working - they are for me in a quick test at least. They should trigger within <?php ... ?> blocks: press ctrl+alt+p and check the status bar, it should look something like "source.php.embedded.block.html text.html.basic". If any of the fragments there contain "source.php", as in the previous example, then the snippets should be triggering ok.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: PHP filetype using HTML snippets

Postby dzdrazil on Tue Oct 05, 2010 12:44 pm

I noticed two things that may have caused problems:
When I first started sublimetext, even though I had a PHP file open it was initially set to HTML mode- changing it to PHP kept resetting it to HTML. I had fixed this by closing and reopening the program, and clearing out some user settings- I had quotes around a setting that probably didn't need them.

Also, I had a doc block that wasn't registering as being inside of a <?php ?> tag set, it was missing a space after <?php
After a bit of frustration, it seems to be working well enough.

Another side note that this wasn't really normal behavior: Hitting tab would move the cursor to a random location on the page- after hitting tab 3 or 4 times, though, it would return to its original location and start inserting 4 spaces as usual.

Everything seems to be back to normal though
dzdrazil
 
Posts: 3
Joined: Wed Sep 08, 2010 12:57 pm


Return to Technical Support

Who is online

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