Generic Syntax Highlighting

In addition to a built-in set of syntax highlighting parsers for a variety of file types and programming languages, Merge provides a simple generic parser that can be used to highlight other types of file. You can configure a list of file types, together with their keywords, comment styles and operators, to use this generic parser.

File types

This control contains a list of the file types configured to use the generic syntax highlighting parser. Properties associated with each file type can be viewed by clicking on a file type in the list. The name of the file type, and the values of its properties can be edited using the controls to the right of the file types list.

Property Value
File extensions A semicolon-separated list of file names or extensions (e.g. *.src;*.pkg).
Keywords A space-separated list of words that you would like to have appear in a different colour to normal text.
Keywords2 A space-separated list of words that you would like to have appear in a different colour to normal text.
Keywords3 A space-separated list of words that you would like to have appear in a different colour to normal text.
Operators A space-separated list of mathematical operators (e.g. + - * / < >).
Single-line comments A space-separated list of characters or words that can begin a single-line comment (e.g. // ; #).
Multi-line comments (begin) A space-separated list of characters or words that can begin a multi-line comment (e.g. /* (* {).
Multi-line comments (end) A space-separated list of characters or words that can end a multi-line comment (e.g. */ *) }).
Case insensitive When checked, values specified above for keywords, operators, and comments are matched in a case-insensitive manner.
Backslash is an escape character in strings When checked, backslash characters escape characters within strings (e.g. \" \' \\).

+ and - buttons

Use these buttons to add and remove file types to and from the table.

Information The generic parser currently assumes that keywords are case-sensitive, and that both single and double-quotes can be used to denote literal strings. Multi-line comments cannot be nested. Colours can be configured on the Syntax Highlighting options page.