Syntax Highlighting and Colors

Use the Source Editor Preferences dialog box (Preferences -> Source Editor) to turn syntax highlighting on or off and to choose color formats.

Syntax Highlighting

If you choose syntax highlighting, the source editor highlights text elements using different colors. Elements are interpreted based on the type of file loaded into the editor.

Program Source Files

Files with the following extensions are treated as program source:

.c .jav .h
.cc .cpp .hpp
.java .cxx .hxx

The following elements are highlighted in program source files:
Background The background color of the editor pane
Reserved words Keywords, plus true, false, and null (language specific keywords are determined by the file extension)
Comments Text delimited by: //, /*...*/
Numbers Any text element that begins with a digit
All other text Text elements other than those defined above

HTML Files

Files with the .html and .htm extensions are treated as HTML document source.

The following text elements are highlighted in HTML files:
Background The background color of the editor pane
Tags All text between tag brackets
Comments All text between comment characters
Numbers Any text element that begins with a digit
All other text Text elements other than those defined above

Foreground/Background

Choose a preselected combination of foreground (text) and background colors.


If syntax highlighting is turned on, colors that highlight text elements are chosen to fit into the foreground/background color scheme.

See also:

Editing Source
Source Editor Fonts
Source Editor Tabs and Indentation