Formatting program source code

<< Click to Display Table of Contents >>

Navigation:  Basic Working Procedures > Text Formatting and Styles >

Formatting program source code

Examples of program source code are much easier to read if reserved words, comments, identifiers and so on are highlighted as they are in a modern programming editor. Help+Manual's Syntax Highlighting function does this for you. It understands the syntax of a total of 53 different code languages, so yours is almost certainly among them. You can also define up to three different custom formatting sets.

The highlighter is pre-configured with standard formatting for all these languages, but you can change the formatting yourself for every element type in every language to suit your own preferences. (Note that you must do this before applying your formatting. Changing highlighting settings does not change the formatting of code that has already been highlighted.)

Click to expand/collapseHow to format program code
Click to expand/collapseEditing the syntax highlighting style
Click to expand/collapseIndenting with leading spaces/blanks
Click to expand/collapseCustomizing the syntax highlighter
Click to expand/collapseUser-defined highlighters

See also:

Editing styles

Syntax Highlighting