Keywords and Styles

The keyword list contains all the language keywords that can be highlighted with syntax formatting. Each keyword in the list is associated with a style name. The Style Properties command is used to set the formatting options of each style.

For example, in the C Language keyword list, the word “NULL” is associated with the “Null Value” style.

To determine the formatting of any given word in a window, Source Insight locates the word in the keyword list of the appropriate language type. The keyword list contains a style name, which in turn implies the formatting associated with the style.

Therefore, starting with a file name and a word in the file, Source Insight derives the word’s style with this relationship:

 

Figure 5.2 The style used for a word in source text is determined by the keyword list of the language of the document type of the file in question.

By having keywords assigned to formatting styles, you are able to change the syntax formatting quickly by simply changing the style with the Style Properties command. Then all language keywords associated with that style reflect the new style formatting.