Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text Syntax Highlighting specific php files as js files

In Sublime Text, I have a handful of .php files that are javascript with a few PHP constants. How do I get Sublime Text to always syntax highlight these files as JavaScript instead of PHP? I do not want to do "open all with current extension as..."

Is there a way to set syntax highlighting for specific files or files in a specific folder?

Thanks!

like image 454
wwwuser Avatar asked Apr 08 '26 21:04

wwwuser


1 Answers

Whenever you open a file in Sublime Text, it'll show you the file type on the bottom right-hand side. If you click on it, you'll get a list of all the file types supported by Sublime Text.

Click on any one of them to temporarily use syntax highlighting for that file type:

enter image description here

like image 128
Joseph Silber Avatar answered Apr 11 '26 10:04

Joseph Silber



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!