CotEditor's syntax defines the behavior of several functions related to document editing, such as syntax highlighting, extraction rules of Outline, grouped by document type (syntax) so that they can easily be switched depending on the document.
CotEditor automtatically applies one of syntaxes according to the document type. You also can manually set it by selecting a new one from the Syntax menu in the toolbar or the Format menu. A syntax itself defines the rules to which documents the syntax is applied. See Map files to syntaxes to know how CotEditor selects the syntax for a document.
In CotEditor, a syntax defines the behaviors of the following features:
CotEditor bundles syntax definitions for major languages. You can also modify them or add new syntaxes. To manage available syntaxes, choose CotEditor > Settings, then click Format. All syntaxes available are listed in the “Available syntaxes” list.
To add a new syntax, click the Add (plus icon) button below the list. To use an existing syntax as a template for creating your own, choose the Duplicate command in the Action pop-up menu instead.
A syntax definition can be edited through the syntax editor. To open the editor:
In the syntax editor, choose settings for the syntax: