Created
September 27, 2013 17:52
-
-
Save pbanaszkiewicz/6732371 to your computer and use it in GitHub Desktop.
RST Syntax File for Sublime Text -- taken from TextMate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>syntax highlighting for reStructuredText http://docutils.sourceforge.net, based on rst mode from jEdit</string> | |
<key>fileTypes</key> | |
<array> | |
<string>rst</string> | |
<string>rest</string> | |
</array> | |
<key>keyEquivalent</key> | |
<string>^~R</string> | |
<key>name</key> | |
<string>reStructuredText</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>begin</key> | |
<string>^([ \t]*)(?=\S)</string> | |
<key>contentName</key> | |
<string>meta.paragraph.restructuredtext</string> | |
<key>end</key> | |
<string>^(?!\1(?=\S))</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#inline</string> | |
</dict> | |
</array> | |
</dict> | |
</array> | |
<key>repository</key> | |
<dict> | |
<key>inline</key> | |
<dict> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>begin</key> | |
<string>^([ \t]*)((\.\.)\sraw(::)) html</string> | |
<key>captures</key> | |
<dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>meta.directive.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.directive.restructuredtext</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.separator.key-value.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>directives.html</string> | |
<key>end</key> | |
<string>^(?!\1[ \t])</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>text.html.basic</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.directive.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.separator.key-value.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>directives</string> | |
<key>match</key> | |
<string>(\.\.)\s[A-z][A-z0-9-_]+(::)\s*$</string> | |
<key>name</key> | |
<string>meta.other.directive.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>^([ \t]*).*?((::))</string> | |
<key>captures</key> | |
<dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>markup.raw.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.raw.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>verbatim blocks</string> | |
<key>end</key> | |
<string>^(?=\1[^\s]+)</string> | |
<key>name</key> | |
<string>meta.raw.block.restructuredtext</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>match</key> | |
<string>.+</string> | |
<key>name</key> | |
<string>markup.raw.restructuredtext</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>directives</string> | |
<key>match</key> | |
<string>::</string> | |
<key>name</key> | |
<string>meta.startraw.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.italic.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.italic.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>strong emphasis</string> | |
<key>match</key> | |
<string>(\*\*)[^*]+(\*\*)</string> | |
<key>name</key> | |
<string>markup.bold.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.italic.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.italic.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>emphasis</string> | |
<key>match</key> | |
<string>(\*)(?=\w)[^*]+(?<=\w)(\*)</string> | |
<key>name</key> | |
<string>markup.italic.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.link.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>string.other.link.title.restructuredtext</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.separator.key-value.restructuredtext</string> | |
</dict> | |
<key>5</key> | |
<dict> | |
<key>name</key> | |
<string>markup.underline.link.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>replacement</string> | |
<key>match</key> | |
<string>(\.\.)\s+(_)([\w\s]+)(:)\s+(.*)</string> | |
<key>name</key> | |
<string>meta.link.reference.def.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.substitution.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>substitution</string> | |
<key>match</key> | |
<string>(\|)[^|]+(\|_{0,2})</string> | |
<key>name</key> | |
<string>markup.underline.substitution.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>string.other.link.title.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.link.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>links `...`_ or `...`__</string> | |
<key>match</key> | |
<string>\b(\w+)(_)\b</string> | |
<key>name</key> | |
<string>meta.link.reference</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.link.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>string.other.link.title.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.link.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>links `...`_ or `...`__</string> | |
<key>match</key> | |
<string>(`)([\w\s]+)(`_)</string> | |
<key>name</key> | |
<string>meta.link.reference</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.link.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>string.other.link.title.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.location.restructuredtext</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>markup.underline.link.restructuredtext</string> | |
</dict> | |
<key>5</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.location.restructuredtext</string> | |
</dict> | |
<key>6</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.link.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>links `...`_ </string> | |
<key>match</key> | |
<string>(`)([\w\s]+)\s+(<)(.*?)(>)(`_)</string> | |
<key>name</key> | |
<string>meta.link.inline.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.link.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>constant.other.footnote.link.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>6</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>7</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>8</key> | |
<dict> | |
<key>name</key> | |
<string>string.other.footnote.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>replacement</string> | |
<key>match</key> | |
<string>^(\.\.)\s+((\[)(((#?)[^]]*?)|\*)(\]))\s+(.*)</string> | |
<key>name</key> | |
<string>meta.link.footnote.def.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>constant.other.footnote.link</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>footnote reference: [0]_</string> | |
<key>match</key> | |
<string>((\[)[0-9]+(\]))(_)</string> | |
<key>name</key> | |
<string>meta.link.footnote.numeric.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>constant.other.footnote.link</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>footnote reference [#]_ or [#foo]_</string> | |
<key>match</key> | |
<string>((\[#)[A-z0-9_]*(\]))(_)</string> | |
<key>name</key> | |
<string>meta.link.footnote.auto.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>constant.other.footnote.link.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>footnote reference [*]_</string> | |
<key>match</key> | |
<string>((\[)\*(\]))(_)</string> | |
<key>name</key> | |
<string>meta.link.footnote.symbol.auto.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.link.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>constant.other.citation.link.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>5</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>6</key> | |
<dict> | |
<key>name</key> | |
<string>string.other.citation.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>replacement</string> | |
<key>match</key> | |
<string>^(\.\.)\s+((\[)[A-z][A-z0-9]*(\]))(_)\s+(.*)</string> | |
<key>name</key> | |
<string>meta.link.citation.def.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>constant.other.citation.link.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>citation reference</string> | |
<key>match</key> | |
<string>((\[)[A-z][A-z0-9_-]*(\]))(_)</string> | |
<key>name</key> | |
<string>meta.link.citation.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>``</string> | |
<key>captures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.raw.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>inline literal</string> | |
<key>end</key> | |
<string>``</string> | |
<key>name</key> | |
<string>markup.raw.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.intepreted.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.intepreted.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>intepreted text</string> | |
<key>match</key> | |
<string>(`)[^`]+(`)(?!_)</string> | |
<key>name</key> | |
<string>markup.other.command.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.field.restructuredtext</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.field.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>field list</string> | |
<key>match</key> | |
<string>(:)[A-z][A-z0-9 =\s\t_]*(:)</string> | |
<key>name</key> | |
<string>entity.name.tag.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.table.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>table</string> | |
<key>match</key> | |
<string>\+-[+-]+</string> | |
<key>name</key> | |
<string>markup.other.table.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.table.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>table</string> | |
<key>match</key> | |
<string>\+=[+=]+</string> | |
<key>name</key> | |
<string>markup.other.table.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.heading.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>(^(=|-|~|`|#|"|\^|\+|\*){3,}$){1,1}?</string> | |
<key>name</key> | |
<string>markup.heading.restructuredtext</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>^(\.\.)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.comment.restructuredtext</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>comment</string> | |
<key>end</key> | |
<string>$\n?</string> | |
<key>name</key> | |
<string>comment.line.double-dot.restructuredtext</string> | |
</dict> | |
</array> | |
</dict> | |
</dict> | |
<key>scopeName</key> | |
<string>text.restructuredtext</string> | |
<key>uuid</key> | |
<string>62DA9AD6-36E1-4AB7-BB87-E933AD9FD1A4</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment