-
Notifications
You must be signed in to change notification settings - Fork 776
XSHD Tags
Note this list is not finished. You can help and finish the list.
Full list of nodes.
It is the root element for the syntax definition. It is compulsory for the syntax highlighter.
- name: The name of the mode. This is used when you, in the definition of a RuleSet refers to another mode. I.E., one that is defined in an external file. For an example of this see the HTML-Mode that uses the JavaScript-mode this way.
-
extends: Optional. With this you can extend an existing definition. Use the name of the other definition. The
HighlightingManager
will look for it, but both definition-files must be in the same directory. -
extensions: Optional. The file extensions that the mode is applicable for. Extensions must be written with lower case and should include the
.
, as in.txt
. If several extensions are applicable they should be separated with;
.
<SyntaxDefinition name="Example" extensions=".ex;.ext;.exf" extends="C#">
<!-- definitions ... -->
</SyntaxDefinition>
Contains a list of <EnvironmentEntry>
tags or <CustomEnvironmentEntry>
tags.
Contains a list of <Property>
tags.
Defines the rendering of all digits in the definition.
-
name: Optional. Just sets a name for the element, in case of the
<Digits>
-element, set it to "Digits". - bold: Optional. Accepts "true" or "false". Defines if the digits are rendered bold or not.
- italic: Optional. Accepts "true" or "false". Defines if the digits are rendered italic or not.
- color: Optional. Accepts all color names from System.Drawing.Color. Defines the color of the text.
- bgcolor: Optional. Accepts all color names from System.Drawing.Color. Defines the color of the background.
<Digits name="Digits" bold="false" italic="false" color="DarkBlue" />
The <RuleSets>
tag defines the rule sets that are used in the mode, it's just a grouping of the set of rule sets for a mode. You can connect rule sets with each other. Note that all modes are defined in a flat structure even if they are used recursively.
For an example of a mode that uses multiple rule sets see the XML-mode. There is a top level rule-set and and another rule-set that handles highlighting within a tag, i.e., between <
and >
.
Each <RuleSet>
element is a set of <KeyWord>
lists, <Span>
s, and additional rules like <MarkPrevious>
and <MarkFollowing>
.
- name: Each rule set should have a name, except the default rule set. The highlighting parser will look for the default rule set.
-
reference: Optional. With this you can reference a rule set from another highlighting definition. (Like the
extends
attribute in<SyntaxDefinition>
.) - ignorecase: Optional. Accepts "true" and "false". Defines if the character casing is important for the highlighting of the keywords.
- noescapesequences: Optional. Obsolete. Accepts "true" and "false". Defines if the rule set has escape sequences or not.
- escapecharacter: Optional. Accepts a char. Defines the escape character for the rule set.
<SyntaxDefinition name="Example">
<!-- ... -->
<RuleSets>
<RuleSet ignorecase="true">
<!-- ... -->
</RuleSet>
</RuleSets>
</SyntaxDefinition>
Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line into separate symbols, typically key words. It is not necessary, or desirable to include the characters that denote the start or end of a span. Space and Tab are implicitly defined as delimiters and they don't need to be included explicitly (this will probably be changed at some future time).
<SyntaxDefinition name="Example">
<!-- ... -->
<RuleSets>
<RuleSet ignorecase="true">
<Delimiters>&<>~!@$%^*()-+=|\#/{}[]:;"' , .?</Delimiters>
<!-- ... -->
</RuleSet>
</RuleSets>
</SyntaxDefinition>