Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e7c0f82495
Fetching contributors…

Cannot retrieve contributors at this time

230 lines (178 sloc) 9.8 kb
<?xml version="1.0" encoding="UTF-8"?>
<syntax>
<!--
The <head> tag encloses some global information about the mode.
This tag is required.
-->
<head>
<!--
The <name> specifies the modes name.
This tag is required and must match with the name in the plist after the SEEMode..
-->
<name>YAML</name>
<!-- optional to add spelling-dictionary autocomplete words -->
<autocompleteoptions use-spelling-dictionary="yes" />
<!--
The <charsintokens> and the <charsdelimitingtokens> instruct the syntax highlighter
where to tokenize the text for fast finding of plain strings.
The <charsintokens> tag specifies the characters that can occur in strings,
the <charsdelimitingtokens> tag specifies the tags that cannot occur in strings.
One of these tags has to be specified.
Tip: Use CDATA here.
-->
<charsintokens><![CDATA[_0987654321abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@]]></charsintokens>
<!-- <charsdelimitingtokens><![CDATA[ -]]></charsdelimitingtokens> -->
<!--
the <charsincompletion> defines characters used for autocompletion. e.g. in perl
you want this to include the $ sign to autocomplete variables.
If left out the regular expression word boundaries are used.
-->
<!-- <charsincompletion><![CDATA[_0987654321abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-@$</=>!]]></charsincompletion> -->
</head>
<!--
The <states> tag encloses all syntax states.
States are areas of the test that begin and end with an regex like comments or strings,
with exception of the default state, that exists anywhere where no other state exists.
This tag is required.
-->
<states>
<!--
The <default> tag specifies what is colored within the default state (see above).
It features the following attributes, all optional if not noted otherwise:
id
Has to be a unique string. Has to be specified.
color
a html comptible color in three or six letter hexadecimal format.
Used for text on bright document background colors.
inverted-color
a html comptible color in three or six letter hexadecimal format.
Used for text if a dark document background color is set.
font-weight
normal Normal font-weight (default)
bold Bold text in popup
font-style
normal Normal font-weight (default)
italic Bold text in popup
usesymbolsfrommode
a mode name to use the symbol recognition from
when left out the value is inherited from the parent state
useautocompletefrommode
a mode name to use the autocomplete from - default is this mode
when left out the value is inherited from the parent state
type
a string description of the type. currently only the values
"string" and "comment" have meaning and cause bracket matching
and syntax highlighting to ignore these areas of text
-->
<default id="Base" color="#f00" inverted-color="#0f0">
<!--
The <keywords> tag specifies keyword groups within the current state.
It features the following attributes, all optional if not noted otherwise:
id
Has to be a unique string. Has to be specified.
color
a html comptible color in three or six letter hexadecimal format.
Used for text on bright document background colors.
inverted-color
a html comptible color in three or six letter hexadecimal format.
Used for text if a dark document background color is set.
font-weight
normal Normal font-weight (default)
bold Bold text in popup
font-style
normal Normal font-weight (default)
italic Bold text in popup
casesensitive
yes This group is case sensitive (default)
no Ignore case for the group
useforautocomplete
yes Add this group's strings to the autocomplete dictionary (default)
no Don't add to autocomplete dictionary
-->
<keywords id="Keywords" color="#6C0540" casesensitive="no" useforautocomplete="yes">
<!--
<string> tags specify plain text to be colored. If your tag does not
get colored, check in <charsintokens> if you are tokenizing correctly.
-->
<!-- <string>de_DE</string>
<string>en_GB</string> -->
<!--
<regex> tags specify regular expression to be colored.
Only the first group will be colored, so enclose the part to color
with parens.
The example colors digits prefixed by foo. (only the digits)
-->
<regex>^(.*?):</regex>
</keywords>
<keywords id="Other keywords" color="#400080" font-weight="bold" font-style="italic">
<string>de_DE</string>
<string>en_GB</string>
</keywords>
<!--
The <state> tag specifies a state other than the default state.
It features the same attributes as <default>.
It has to contain a <begin> and a <end> tag which in turn have to
contain a <regex> tag. They can contain <keywords> tags like specified above.
For example here a states for C blockcomments, C++ singleline comments and strings.
The strings state handles escaped quotes with a lookbehind regular expression
(see a regex tutorial) and colors "foobar" with strings.
-->
<state id="Comment" color="#236E25" font-style="italic">
<begin><regex>(?:^|\s)#</regex></begin>
<end><regex>[\n\r]</regex></end>
</state>
<state id="String" color="#760f15">
<begin><regex>"</regex></begin>
<end><regex>(((?&lt;!\\)(\\\\)*)|^)"</regex></end>
<keywords id="Other keywords" color="#400080" font-style="italic">
<string>foobar</string>
</keywords>
</state>
<!--
The <import> tag lets you import substates and keywords from other modes.
It features the following attributes, all optional if not noted otherwise:
mode
the mode to import from if left out it will import from this mode
state
the state to import - if left out the content of the
default state will be imported
keywords-only
'yes' if you only want to import the keywords and not the substates
of that state
-->
<state id="Inline Javascript" color="#000" usesymbolsfrommode="Javascript" useautocompletefrommode="Javascript">
<begin><regex>&lt;(?=script)</regex></begin>
<end><regex>/script&gt;</regex></end>
<import mode="Javascript" />
<keywords id="Script Tags" color="#881280" font-style="italic">
<regex>(\A&lt;\Z)</regex>
<regex>(&lt;/script[^&gt;]*&gt;)</regex>
</keywords>
<state id="Opening Script Tag" color="#881280" font-style="italic" usesymbolsfrommode="HTML" useautocompletefrommode="HTML">
<begin><regex>\Ascript</regex></begin>
<end><regex>&gt;</regex></end>
<import mode="XML" state="Tags" />
</state>
</state>
<!--
The <state-link> tag lets you reuse complete states including the
begin and end regex as well as the attributes on the linked .
It features the following attributes, all optional if not noted otherwise:
state
the state to link - not optional
mode
the mode to import from if left out it will import from this mode
-->
<state-link state="PHP" mode="PHP-HTML" />
<state id="Ruby" color="#000000" inverted-color="#ffffff" font-style="normal" font-weight="normal" usesymbolsfrommode="Ruby" useautocompletefrommode="Ruby">
<begin><regex>(?:&lt;%=?)</regex></begin>
<end><regex>(?:-?%&gt;)</regex></end>
<import mode="Ruby" />
<keywords id="ERB Delimiter" color="#d00000" inverted-color="#ff2f2f" font-style="normal" font-weight="normal" useforautocomplete="no">
<regex>(-?%&gt;)</regex>
<regex>(&lt;%=?)</regex>
</keywords>
</state>
</default>
</states>
</syntax>
Jump to Line
Something went wrong with that request. Please try again.