Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to choose highlight language in sublime text 2

Tags:

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.

like image 561
yfdream Avatar asked Dec 03 '14 05:12

yfdream


People also ask

How do I change the syntax highlighting in Sublime Text?

The colors of the syntax highlighting depend on Sublime Text's color theme. You can change the theme by going to Preferences > Color Scheme.

How do I highlight code in Sublime Text?

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.

Does Sublime Text support syntax highlighting?

Sublime Text can use both . sublime-syntax and . tmLanguage files for syntax highlighting.

Where does sublime save syntax?

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.


1 Answers

Bottom right corner there's a dropdown where you can select what syntax to highlight

enter image description here

Also View->Syntax menu will do the same

like image 90
Alexander Starostin Avatar answered Sep 21 '22 18:09

Alexander Starostin