Language Keyword Styles

The simplest application of styles is for formatting language keywords. Each language contains a keyword list. Each keyword list associates a keyword, for example “while”, with a style. The keyword list is editable and is stored in the configuration file. Source Insight will recognize a keyword, and apply the associated style to the keyword. You edit the language keyword list in the Preferences: Languages dialog box, or by invoking the Keyword List command directly. See also “Keyword List”.

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 4.12 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.