# Syntax Highlighter Preferences Page

The appearance of syntax highlighted source files can be customised using this page of the Preferences dialogue box. The page is accessed by selecting the Tools | Preferences menu item then clicking on Syntax Highlighter in the list on the left of the window.

### Note

Syntax highlighter customisation applies to the Detail Pane, exported files and source code copied to the clipboard. Highlighting used in printed documents is configured from the Printing preferences page.

Different syntax highlighter styles can be saved and given identifying names for later use.

## Highlighter Font

The font used by the highlighter can be changed. Choose one of the available fixed-pitch fonts from the Font name drop down list and specify the font size using the Font size combo box.

Note: The highlighter font is ignored in code previews in other pages of the Preferences dialogue box to ensure that previews fit the available space.

## Syntactic Elements

The colour and font style used for various syntactic elements of the source code can be changed. Select an element in the Elements list box then edit its style using the Font style check boxes and the Colour drop down list. A preview of the element is displayed.

## Named Styles

CodeSnip provides some pre-defined styles that are applied by clicking the Use Predefined Style button and selecting the style from the drop-down menu that appears.

The styles are:

1. CodeSnip Classic – style of highlighting used in the main display of CodeSnip v2 and earlier.
2. Delphi 7 – default highlighting style used in Delphi 7.
3. RAD Studio – default highlighting style used in Borland / CodeGear / Embarcadero RAD Studio.
4. Visual Studio™ – default highlighting style used by Microsoft Visual Studio.
5. User Defined Styles – displays the User Defined Highlighters dialogue box where any custom styles saved by the user can be selected. Saved highlighters can also be deleted from this dialogue box.
6. No Highlighter – no syntax highlighting is used.

## Reseting the Highlighter

The highlighter font and all the element styles can be reset to their default appearance by pressing the Restore Defaults button. The default is the RAD Studio style.

## Saving Custom Highlighters

If you want to regularly switch highlighter styles, for example for printing, and don't want to confine yourself to the pre-defined styles, CodeSnip lets you save the current style.

To do this click the Save Style button to display the Save Highlighter dialogue box where you can choose a name for the style.

Saved styles can be restored (or deleted) by clicking the Use Named Style button and selecting the User Defined Styles option (see above).

Any number of custom highlighter styles can be saved.