I want to know how to choose highlight language in Sublime text 2.
For Example, when I am typing some text, and I want to use C++ language highlight, then I want to change to Java language highlight.
Can this be done?
Please advise!
Thanks very much.
The colors of the syntax highlighting depend on Sublime Text's color theme. You can change the theme by going to Preferences > Color Scheme.
To enable Syntax Highlighting click on “View” in the top bar, then hover your mouse over “Syntax”, and select your programming language from the list. Alternatively, if you save a document with a supported file extension, Sublime Text 3 will automatically apply the Syntax Highlighting for that language.
Sublime Text can use both . sublime-syntax and . tmLanguage files for syntax highlighting.
You put your syntax definitions inside a package: Select Preferences > Browse Packages... this should open your file explorer. There you can either create a new folder for a new package or use the User folder, which is the default user package. Inside that create a file YourSyntax.
Bottom right corner there's a dropdown where you can select what syntax to highlight
Also View->Syntax menu will do the same
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With