Syntax colouring¶
The editor colours source code according to its language, making structure easy to read at a glance. Colouring is powered by Lexilla (the lexer library used by Notepad++ and SciTE), so a wide range of languages is supported out of the box.
How it works¶
A colorizer identifies the language and tags each token (keyword, string, comment, number, type, …); a theme maps each token category to a colour. Because every language speaks the same set of categories, switching the theme recolours all of them at once.
Choosing the language¶
The language is detected automatically when you open a file, in this order:
- An extension override you set in Preferences ▸ Syntax Colouring.
- An exact file-name match (e.g.
Makefile,.gitignore). - The file's extension.
- A first-line marker (e.g. a
#!shebang or<?xml).
Use the Language menu to override the detected language for the current document when the automatic choice isn't what you want.
Settings¶
Preferences ▸ Syntax Colouring lets you:
- Choose the active theme (and, with the Theme Editor, create or edit themes).
- Toggle whole token categories on/off (e.g. turn off comment colouring) so they fall back to the default text colour.
- Set extension overrides to force a file type to a specific language.
Add your own languages and themes
Colorizers and themes are plain JSON files you can edit or add without rebuilding — drop them in your user config directory and they override or extend the shipped set. The colorizer file also owns each language's extensions, keywords and token-style mapping.