Define the EditPlus syntax File

Source: Internet
Author: User
Tags keyword list

Address: http://hi.baidu.com/3715cc/blog/item/ac5176d086bc7284a1ec9c26.html

EditPlus supports syntax highlighting in many languages by default. However, if you want to add a syntax file to support other programming languages, you need to customize a syntax file, and make some settings Association in EditPlus.

A syntax file is a common text file with the extension ". stx", but you should use the format of the predefined function for writing. This format is very simple. The quickest way is to refer to the example with the extension ". stx". For example, "js. stx" is a syntax highlighted file provided for JavaScript files.

# TITLE = C/C ++
# DELIMITER =, ()} []-+ * %/= "'~! & |/ <>? :;.
# QUOTATION1 ='
# QUOTATION2 ="
# CONTINUE_QUOTE = n
# LINECOMMENT = //
# LINECOMMENT2 =
# COMMENTON = /*
# COMMENTOFF = */
# COMMENTON2 =
# COMMENTOFF2 =
# ESCAPE =/
# CASE = y
# PREFIX1 =
# PREFIX2 =
# PREFIX3 =
# PREFIX4 =
# PREFIX5 =
# SUFFIX1 =
# SUFFIX2 =
# SUFFIX3 =
# SUFFIX4 =
# SUFFIX5 =
# HTML_EMBEDDED =
# SCRIPT_BEGIN =
# SCRIPT_END =
# HEREDOC =
# AUTOCASE =
# NUMBER_PATTERN = cpp
# SPECIAL_STX = cpp

All declarations must be prefixed with the "#" symbol.

# TITLE
The title of the syntax file. You must write this statement in the first sentence of the file. Otherwise, EditPlus cannot be loaded.

# DELIMITER
Specifies the delimiter of the keyword to be parsed. You do not need to specify spaces and Tab characters here, because these are default separators.

# QUOTATION1
Specify a reference mark. Only one character can be entered here.

# QUOTATION2
Specifies the alternate reference mark. Only one character can be entered here.

# CONTINUE_QUOTE
This option allows you to abort the reference that persists to the next row. "Y" indicates "yes", and "n" indicates "no". The default value is "n ".

# LINECOMMENT
Specifies the start string of a line comment. If the line comment string is "^ !" Is the prefix, so this comment is only processed when it appears at the beginning of the line.

# LINECOMMENT2
Specifies the comment string of the second line. If the line comment string is "^ !" Is the prefix, so this comment is only processed when it appears at the beginning of the line.

# COMMENTON
Specifies the start string of a block comment.

# COMMENTOFF
End string of a block comment.

# COMMENTON2
Specifies the start string of the second annotation.

# COMMENTOFF2
End string of the second annotation.

# ESCAPE
Specifies an escape character. Only one character can be entered here.

# CASE
Specifies whether it is case sensitive. "y" indicates "yes", and "n" indicates "no". The default value is "n ".

# PREFIX1-# PREFIX5
Specifies the keyword prefix. Any word prefixed with this character is treated as a keyword.

# SUFFIX1-# SUFFIX5
Specifies the keyword prefix. Any word prefixed with this character is treated as a keyword.

# HTML_EMBEDDED
If it is an HTML embedded scripting language, such as "PHP", it is specified as "y ". See "PHP. STX ".

# SCRIPT_BEGIN
Specifies the start flag string used as the HTML embedded scripting language. This option is valid only when the # HTML_EMBEDDED option value is "y. See "PHP. STX ".

# SCRIPT_END
End tag string of the HTML embedded scripting language. This option is valid only when the # HTML_EMBEDDED option value is "y. See "PHP. STX ".

# HEREDOC
Specifies the syntax string of a document in the Perl and PHP files. For example: # HEREDOC = <EOF.

# AUTOCASE
If you want to use the feature of automatically correcting keywords, specify "y ".

# NUMBER_PATTERN
"Cpp" indicates that the numeric syntax highlight is provided for C/C ++.

# SPECIAL_STX
"Html" is an HTML syntax file, "cpp" is a C/C ++ syntax file, and "perl" is a Perl syntax file. Leave blank to indicate all syntax files.

You can also insert a line comment in the syntax file. The line comment must start. If you want to add a ";" key, you must add a "^" character before the character to escape it.

Keyword Group

# KEYWORD = Reserved words
Abstract
Boolean
Break

# KEYWORD = Compiler directives
...

Each KEYWORD group starts with the # KEYWORD declaration and then connects to any description of this group. The keyword list starts from the next row. To include a "#" keyword, you must add a "^" character before the character to escape it. Like this: "^ #". In this case, the "#" character should not be included in the # DELIMITER declaration. You can specify a maximum of 10 keyword groups.

User File Knowledge Base

The EditPlus website http://www.editplus.com/files/has a set of strong user files (stx, ctl, acp files) on the user file page. If you want to share your files to other users, You can submit your syntax file to <ubmit@editplus.com>.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.