When you’re writing code, using a flexible text editor can be very helpful. Sublime Text 3 is a very flexible text editor with a lot of helpful features. One of those features is called “Syntax Highlighting”. Syntax Highlighting applies colours to syntax within your code to make it easier to see what certain parts of the code mean at a quick glance. Syntax Highlighting can also make code a fair bit easier to read as the structure is more visually defined.
Tip: Syntax is a set of rules that describe the structure of a language. Syntax can vary heavily between languages.
Syntax Highlighting can be configured to match the syntax of any of the 74 languages and variants of languages included in Sublime Text 3.
Tip: Syntax Highlighting applies to the whole document, it’s not possible to configure a section of code to use a different set of Syntax Highlighting rules.
How to enable Syntax Highlighting
To manually enable Syntax Highlighting in a document, click on “View” in the top bar, then hover your mouse over “Syntax” roughly halfway down the drop-down list. Next, click the language you are using from the second level of the drop-down list. Once you select a language, Sublime Text will use the Syntax Highlighting for that language.
Alternatively, if you save a document with a supported file extension, Sublime Text 3 will automatically apply the Syntax Highlighting for that language. For example, if you save a document with the file extension “.py” for Python documents, then Sublime Text 3 will automatically enable the Python Syntax Highlighting.
Tip: To disable Syntax Highlighting, select “Plaintext” from the supported language list.
feral dingo says
took me a while to find this answer. (about 10 sites before I found my way here.)
thank you.