Syntax file format
EditPlus uses a simple, plain text syntax file format to describe a programming language for syntax highlighting.
EditPlus comes with 12 syntax (.stx) files, located in "C:\Program Files\EditPlus 2", which can be opened and modified within EditPlus. You can also create your own custom syntax file (or use one created by someone else) and configure EditPlus to associate it with a certain file extension by going to Tools > Preferences > Files > Settings & Syntax.
To download syntax files, see syntax files.
You can comment a line by beginning it with a ';' (semicolon). If you need to add a keyword which begins with semicolon, you must prefix it with an escape character '^' (caret).
If a header statement has no value, leave it blank after the '=' (equal sign).
- The title of the syntax file. It should be located at the first line of the file. Otherwise, EditPlus cannot load it.
- Specify delimiters for parsing keywords. You don't need to specify the space character and the tab character here, since those are treated as delimiters by default.
- Specify quotation mark. Enter only one character.
- Specify alternate quotation mark. Enter only one character.
- This option allows un-terminated quotation to be continued to next line. 'y' for yes and 'n' for no. 'n' is default value.
- Specify a string which turns on line comment. If you prefix ^! to the line comment string, it works only when located at the beginning of line.
- Specify a string which turns on line comment 2. If you prefix ^! to the line comment string, it works only when located at the beginning of line.
- Specify a string which turns on block comment.
- Specify a string which turns off block comment.
- Specify a string which turns on block comment 2.
- Specify a string which turns off block comment 2.
- Specify escape character. Enter only one character here.
- Specify case sensitivity. 'y' for yes and 'n' for no. Default value is 'n'.
- #PREFIX1= through #PREFIX5=
- Specify keyword prefix character. Any word that follows the prefix will be treated as a keyword.
- #SUFFIX1= through #SUFFIX5=
- Specify keyword suffix character. Any word that precedes the suffix will be treated as a keyword.
- Specify 'y' if it is HTML-embedded script such as PHP. See 'PHP.STX' for an example.
- Specify the string which turns on HTML-embedded script. Valid only if ; #HTML_EMBEDDED is 'y'. See 'PHP.STX' for an example.
- Specify the string which turns off HTML-embedded script. Valid only if ; #HTML_EMBEDDED is 'y'. See 'PHP.STX' for an example.
- 'cpp' for C/C++ number syntax highlighting.
- 'html' for HTML syntax file, 'cpp' for C/C++ syntax file, and 'perl' for Perl syntax file. Leave blank for all other syntax files
- Automatic case correction.
- Avoid problems like SCRIPT_END characters within quotes. For example "?>" in php should not close the script highlighting
- The character used to delimit a regular expression constant. (As of version 2.20)
- Delimiter for heredoc strings. Formatted like "<<EOF". (As of version 2.20)
Each of a maximum of 5 keyword groups begins with the #KEYWORD statement and an optional description of the group. The keyword list follows from the next line. If you need to include a '#' sign into a keyword, you must prefix it with an escape character '^' (caret) like this: '^#'. If such keywords exist, the '#' sign should not be included in #DELIMITER header statement above.
#KEYWORD=Reserved words abstract boolean break #KEYWORD=Compiler directives ...
Other File Formats
- See auto-completion file format for information on setting up keywords that trigger insertion of text
- See cliptext file format for information on creating a sidebar library of commonly used text chunks