The PHP code within Javascript's string is not highlighted as PHP syntax. As show in the attached screenshot. Is is possible to make it correctly highlighted?
Attachments
sublime-js-php-syntax-highlight.png (37.01 KiB) Viewed 691 times
It is possible. You would need to either edit the javascript.tmlanguage file and declare a rule that matches <?php (.*) ?> within a string or create a new tmlanguage file that matches strings with php code in it and include the source.js.
The part you want to edit is line 409 to line 474 in Javascript.tmLanguage. Just include the rule for <php tags in both string.quoted.double.js and string.quoted.single.js.
Anyone got a proper fix for this? I just started using sublime and have been trying to fix this in the language files for hours. Looks like it would be quite a common syntax... N++ handles it just fine
I was going to start using sublime text instead of zend studio today on linux but this stoped me, in my case it was in html though, ¿perhaps they should include this option from scratch in js as well as in html?