Home Download Buy Blog Forum Support

Different scopes for HTML in PHP files vs normal HTML files

Different scopes for HTML in PHP files vs normal HTML files

Postby seanch on Mon Nov 09, 2009 10:37 pm

I realize this might not be possible, but I think having different scopes for HTML in PHP files and HTML in normal HTML files so they could be highlighted differently would be nice. Currently the scope for both is "text.html.basic".

Some possible approaches might be detecting whether there are any PHP blocks, looking at the file extension for saved files, and/or remembering if the user manually picked PHP or HTML in the syntax highlighting menu.

So as not to break the existing syntax highlighting themes the scope for HTML in PHP files could be something like "text.html.basic.php" or "text.html.basic.embedded" (though technically it's the PHP blocks that are embedded in the HTML). Or maybe have a new top level scope like "file.php", "file.html", etc. so the overall scope for HTML in PHP files would be "text.html.basic file.php".
seanch
 
Posts: 7
Joined: Mon Nov 09, 2009 9:19 pm

Re: Different scopes for HTML in PHP files vs normal HTML files

Postby EJ12N on Wed Nov 11, 2009 4:54 am

well in themes if I'm not mistaken there is "Embedded Source" which allows you to change the look of embedded code...
I Personally just change the bg to make it distinct enough...
Image
anyways, source.php scope works on PHP files and HTML files with php too...
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests