Skip to content

Instantly share code, notes, and snippets.

@edubkendo
Created August 10, 2013 03:58
Show Gist options
  • Save edubkendo/6198986 to your computer and use it in GitHub Desktop.
Save edubkendo/6198986 to your computer and use it in GitHub Desktop.
A better ruby syntax highlighter for sublime text. Combines the ruby bundle with ST, recent updates to the textmate bundle, and a tmLanguage file called "Experimental Ruby".
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>
TODO: unresolved issues
text:
"p &lt;&lt; end
print me!
end"
symptoms:
not recognized as a heredoc
solution:
there is no way to distinguish perfectly between the &lt;&lt; operator and the start
of a heredoc. Currently, we require assignment to recognize a heredoc. More
refinement is possible.
• Heredocs with indented terminators (&lt;&lt;-) are always distinguishable, however.
• Nested heredocs are not really supportable at present
text:
print &lt;&lt;-'THERE'
This is single quoted.
The above used #{Time.now}
THERE
symtoms:
From Programming Ruby p306; should be a non-interpolated heredoc.
text:
"a\332a"
symptoms:
'\332' is not recognized as slash3.. which should be octal 332.
solution:
plain regexp.. should be easy.
text:
val?(a):p(b)
val?'a':'b'
symptoms:
':p' is recognized as a symbol.. its 2 things ':' and 'p'.
:'b' has same problem.
solution:
ternary operator rule, precedOence stuff, symbol rule.
but also consider 'a.b?(:c)' ??
</string>
<key>fileTypes</key>
<array>
<string>rb</string>
<string>rbx</string>
<string>rjs</string>
<string>Rakefile</string>
<string>rake</string>
<string>cgi</string>
<string>fcgi</string>
<string>gemspec</string>
<string>irbrc</string>
<string>capfile</string>
<string>ru</string>
<string>prawn</string>
<string>Gemfile</string>
<string>Guardfile</string>
<string>Vagrantfile</string>
</array>
<key>firstLineMatch</key>
<string>^#!/.*\bruby</string>
<key>foldingStartMarker</key>
<string>(?x)^
(\s*+
(module|class|def(?!.*\bend\s*$)
|unless|if
|case
|begin
|for|while|until
|^=begin
|( "(\\.|[^"])*+" # eat a double quoted string
| '(\\.|[^'])*+' # eat a single quoted string
| [^#"'] # eat all but comments and strings
)*
( \s (do|begin|case)
| (?&lt;!\$)[-+=&amp;|*/~%^&lt;&gt;~] \s*+ (if|unless)
)
)\b
(?! [^;]*+ ; .*? \bend\b )
|( "(\\.|[^"])*+" # eat a double quoted string
| '(\\.|[^'])*+' # eat a single quoted string
| [^#"'] # eat all but comments and strings
)*
( \{ (?! [^}]*+ \} )
| \[ (?! [^\]]*+ \] )
)
).*$
| [#] .*? \(fold\) \s*+ $ # Sune’s special marker
</string>
<key>foldingStopMarker</key>
<string>(?x)
( (^|;) \s*+ end \s*+ ([#].*)? $
| (^|;) \s*+ end \. .* $
| ^ \s*+ [}\]] ,? \s*+ ([#].*)? $
| [#] .*? \(end\) \s*+ $ # Sune’s special marker
| ^=end
)</string>
<key>keyEquivalent</key>
<string>^~R</string>
<key>name</key>
<string>BetterRuby</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.class.ruby</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.type.class.ruby</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>entity.other.inherited-class.ruby</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>punctuation.separator.inheritance.ruby</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>variable.other.object.ruby</string>
</dict>
<key>7</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.ruby</string>
</dict>
</dict>
<key>match</key>
<string>^\s*(class)\s+(([.a-zA-Z0-9_:]+(\s*(&lt;)\s*[.a-zA-Z0-9_:]+)?)|((&lt;&lt;)\s*[.a-zA-Z0-9_:]+))</string>
<key>name</key>
<string>meta.class.ruby</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.module.ruby</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.type.module.ruby</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.other.inherited-class.module.first.ruby</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>punctuation.separator.inheritance.ruby</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>entity.other.inherited-class.module.second.ruby</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>punctuation.separator.inheritance.ruby</string>
</dict>
<key>7</key>
<dict>
<key>name</key>
<string>entity.other.inherited-class.module.third.ruby</string>
</dict>
<key>8</key>
<dict>
<key>name</key>
<string>punctuation.separator.inheritance.ruby</string>
</dict>
</dict>
<key>match</key>
<string>^\s*(module)\s+(([A-Z]\w*(::))?([A-Z]\w*(::))?([A-Z]\w*(::))*[A-Z]\w*)</string>
<key>name</key>
<string>meta.module.ruby</string>
</dict>
<dict>
<key>comment</key>
<string>else if is a common mistake carried over from other languages. it works if you put in a second end, but it’s never what you want.</string>
<key>match</key>
<string>(?&lt;!\.)\belse(\s)+if\b</string>
<key>name</key>
<string>invalid.deprecated.ruby</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.constant.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>symbols as hash key (1.9 syntax)</string>
<key>match</key>
<string>(?&gt;[a-zA-Z_]\w*(?&gt;[?!])?)(:)(?!:)</string>
<key>name</key>
<string>constant.other.symbol.hashkey.ruby</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.constant.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>symbols as hash key (1.8 syntax)</string>
<key>match</key>
<string>(?&lt;!:)(:)(?&gt;[a-zA-Z_]\w*(?&gt;[?!])?)(?=\s*=&gt;)</string>
<key>name</key>
<string>constant.other.symbol.hashkey.ruby</string>
</dict>
<dict>
<key>comment</key>
<string>everything being a reserved word, not a value and needing a 'end' is a..</string>
<key>match</key>
<string>(?&lt;!\.)\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\b(?![?!])</string>
<key>name</key>
<string>keyword.control.ruby</string>
</dict>
<dict>
<key>comment</key>
<string>contextual smart pair support for block parameters</string>
<key>match</key>
<string>(?&lt;!\.)\bdo\b\s*</string>
<key>name</key>
<string>keyword.control.start-block.ruby</string>
</dict>
<dict>
<key>comment</key>
<string>contextual smart pair support</string>
<key>match</key>
<string>(?&lt;=\{)(\s+)</string>
<key>name</key>
<string>meta.syntax.ruby.start-block</string>
</dict>
<dict>
<key>comment</key>
<string> as above, just doesn't need a 'end' and does a logic operation</string>
<key>match</key>
<string>(?&lt;!\.)\b(and|not|or)\b</string>
<key>name</key>
<string>keyword.operator.logical.ruby</string>
</dict>
<dict>
<key>comment</key>
<string> just as above but being not a logical operation</string>
<key>match</key>
<string>(?&lt;!\.)\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?|\bblock_given\?</string>
<key>name</key>
<string>keyword.control.pseudo-method.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\b(nil|true|false)\b(?![?!])</string>
<key>name</key>
<string>constant.language.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\b(__(FILE|LINE)__|self)\b(?![?!])</string>
<key>name</key>
<string>variable.language.ruby</string>
</dict>
<dict>
<key>comment</key>
<string> everything being a method but having a special function is a..</string>
<key>match</key>
<string>\b(initialize|new|loop|include|extend|prepend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\b(?![?!])</string>
<key>name</key>
<string>keyword.other.special-method.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\b(require|require_relative|gem|import|java_import)\b</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.ruby</string>
</dict>
</dict>
<key>end</key>
<string>$|(?=#|\})</string>
<key>name</key>
<string>meta.require.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.ruby</string>
</dict>
</dict>
<key>match</key>
<string>(@)[a-zA-Z_]\w*</string>
<key>name</key>
<string>variable.other.readwrite.instance.ruby</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.ruby</string>
</dict>
</dict>
<key>match</key>
<string>(@@)[a-zA-Z_]\w*</string>
<key>name</key>
<string>variable.other.readwrite.class.ruby</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.ruby</string>
</dict>
</dict>
<key>match</key>
<string>(\$)[a-zA-Z_]\w*</string>
<key>name</key>
<string>variable.other.readwrite.global.ruby</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.ruby</string>
</dict>
</dict>
<key>match</key>
<string>(\$)(!|@|&amp;|`|'|\+|\d+|~|=|/|\\|,|;|\.|&lt;|&gt;|_|\*|\$|\?|:|"|-[0adFiIlpv])</string>
<key>name</key>
<string>variable.other.readwrite.global.pre-defined.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\b(ENV)\[</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>variable.other.constant.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>name</key>
<string>meta.environment-variable.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>\b[A-Z]\w*(?=((\.|::)[A-Za-z]|\[))</string>
<key>name</key>
<string>support.class.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\b[A-Z]\w*\b</string>
<key>name</key>
<string>variable.other.constant.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>(?x)
(?=def\b) # an optimization to help Oniguruma fail fast
(?&lt;=^|\s)(def)\s+ # the def keyword
( (?&gt;[a-zA-Z_]\w*(?&gt;\.|::))? # a method name prefix
(?&gt;[a-zA-Z_]\w*(?&gt;[?!]|=(?!&gt;))? # the method name
|===?|&gt;[&gt;=]?|&lt;=&gt;|&lt;[&lt;=]?|[%&amp;`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method
\s*(\() # the openning parenthesis for arguments
</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.def.ruby</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.function.ruby</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.parameters.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>the method pattern comes from the symbol pattern, see there for a explaination</string>
<key>contentName</key>
<string>variable.parameter.function.ruby</string>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.parameters.ruby</string>
</dict>
</dict>
<key>name</key>
<string>meta.function.method.with-arguments.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?![\s,)])</string>
<key>end</key>
<string>(?=[,)])</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.type.variable.ruby</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>variable.parameter.function.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\G([&amp;*]?)([_a-zA-Z][_a-zA-Z0-9]*)</string>
</dict>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?x)
(?=def\b) # an optimization to help Oniguruma fail fast
(?&lt;=^|\s)(def)\s+ # the def keyword
( (?&gt;[a-zA-Z_]\w*(?&gt;\.|::))? # a method name prefix
(?&gt;[a-zA-Z_]\w*(?&gt;[?!]|=(?!&gt;))? # the method name
|===?|&gt;[&gt;=]?|&lt;=&gt;|&lt;[&lt;=]?|[%&amp;`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method
[ \t] # the space separating the arguments
(?=[ \t]*[^\s#;]) # make sure arguments and not a comment follow
</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.def.ruby</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.function.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>same as the previous rule, but without parentheses around the arguments</string>
<key>contentName</key>
<string>variable.parameter.function.ruby</string>
<key>end</key>
<string>$</string>
<key>name</key>
<string>meta.function.method.with-arguments.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?![\s,])</string>
<key>end</key>
<string>(?=,|$)</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\G([&amp;*]?)[_a-zA-Z][_a-zA-Z0-9]*</string>
<key>name</key>
<string>variable.parameter.function.ruby</string>
</dict>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.def.ruby</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.name.function.ruby</string>
</dict>
</dict>
<key>comment</key>
<string> the optional name is just to catch the def also without a method-name</string>
<key>match</key>
<string>(?x)
(?=def\b) # an optimization to help Oniguruma fail fast
(?&lt;=^|\s)(def)\b # the def keyword
( \s+ # an optional group of whitespace followed by…
( (?&gt;[a-zA-Z_]\w*(?&gt;\.|::))? # a method name prefix
(?&gt;[a-zA-Z_]\w*(?&gt;[?!]|=(?!&gt;))? # the method name
|===?|&gt;[&gt;=]?|&lt;=&gt;|&lt;[&lt;=]?|[%&amp;`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) )? # …or an operator method
</string>
<key>name</key>
<string>meta.function.method.without-arguments.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\b(0[xX]\h(?&gt;_?\h)*|\d(?&gt;_?\d)*(\.(?![^[:space:][:digit:]])(?&gt;_?\d)*)?([eE][-+]?\d(?&gt;_?\d)*)?|0[bB][01]+)\b</string>
<key>name</key>
<string>constant.numeric.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>:'</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.constant.ruby</string>
</dict>
</dict>
<key>end</key>
<string>'</string>
<key>name</key>
<string>constant.other.symbol.single-quoted.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\['\\]</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>:"</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.constant.ruby</string>
</dict>
</dict>
<key>end</key>
<string>"</string>
<key>name</key>
<string>constant.other.symbol.double-quoted.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>Needs higher precidence than regular expressions.</string>
<key>match</key>
<string>(?&lt;!\()/=</string>
<key>name</key>
<string>keyword.operator.assignment.augmented.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>'</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>single quoted string (does not allow interpolation)</string>
<key>end</key>
<string>'</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.single.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\'|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>"</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>double quoted string (allows for interpolation)</string>
<key>end</key>
<string>"</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.double.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>`</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>execute string (allows for interpolation)</string>
<key>end</key>
<string>`</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.interpolated.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%x\{</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>execute string (allow for interpolation)</string>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.interpolated.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_curly_i</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%x\[</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>execute string (allow for interpolation)</string>
<key>end</key>
<string>\]</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.interpolated.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_brackets_i</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%x\&lt;</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>execute string (allow for interpolation)</string>
<key>end</key>
<string>\&gt;</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.interpolated.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_ltgt_i</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%x\(</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>execute string (allow for interpolation)</string>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.interpolated.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_parens_i</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%x([^\w])</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>execute string (allow for interpolation)</string>
<key>end</key>
<string>\1</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.interpolated.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?x)
(?:
^ # beginning of line
| (?&lt;= # or look-behind on:
[=&gt;~(?:\[,|&amp;;]
| [\s;]if\s # keywords
| [\s;]elsif\s
| [\s;]while\s
| [\s;]unless\s
| [\s;]when\s
| [\s;]assert_match\s
| [\s;]or\s # boolean opperators
| [\s;]and\s
| [\s;]not\s
| [\s.]index\s # methods
| [\s.]scan\s
| [\s.]sub\s
| [\s.]sub!\s
| [\s.]gsub\s
| [\s.]gsub!\s
| [\s.]match\s
)
| (?&lt;= # or a look-behind with line anchor:
^when\s # duplication necessary due to limits of regex
| ^if\s
| ^elsif\s
| ^while\s
| ^unless\s
)
)
\s*((/))(?![*+{}?])
</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>string.regexp.classic.ruby</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>regular expressions (normal)
we only start a regexp if the character before it (excluding whitespace)
is what we think is before a regexp
</string>
<key>contentName</key>
<string>string.regexp.classic.ruby</string>
<key>end</key>
<string>((/[eimnosux]*))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%r\{</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>regular expressions (literal)</string>
<key>end</key>
<string>\}[eimnosux]*</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.mod-r.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>include</key>
<string>#nest_curly_r</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%r\[</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>regular expressions (literal)</string>
<key>end</key>
<string>\][eimnosux]*</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.mod-r.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>include</key>
<string>#nest_brackets_r</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%r\(</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>regular expressions (literal)</string>
<key>end</key>
<string>\)[eimnosux]*</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.mod-r.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>include</key>
<string>#nest_parens_r</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%r\&lt;</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>regular expressions (literal)</string>
<key>end</key>
<string>\&gt;[eimnosux]*</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.mod-r.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>include</key>
<string>#nest_ltgt_r</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%r([^\w])</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>regular expressions (literal)</string>
<key>end</key>
<string>\1[eimnosux]*</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.mod-r.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[QWSR]?\(</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal capable of interpolation ()</string>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.upper.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_parens_i</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[QWSR]?\[</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal capable of interpolation []</string>
<key>end</key>
<string>\]</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.upper.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_brackets_i</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[QWSR]?\&lt;</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal capable of interpolation &lt;&gt;</string>
<key>end</key>
<string>\&gt;</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.upper.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_ltgt_i</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[QWSR]?\{</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal capable of interpolation -- {}</string>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.double.ruby.mod</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_curly_i</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[QWSR]([^\w])</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal capable of interpolation -- wildcard</string>
<key>end</key>
<string>\1</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.upper.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%([^\w\s=])</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal capable of interpolation -- wildcard</string>
<key>end</key>
<string>\1</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.other.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[qws]\(</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal incapable of interpolation -- ()</string>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.lower.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\)|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>include</key>
<string>#nest_parens</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[qws]\&lt;</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal incapable of interpolation -- &lt;&gt;</string>
<key>end</key>
<string>\&gt;</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.lower.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\&gt;|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>include</key>
<string>#nest_ltgt</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[qws]\[</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal incapable of interpolation -- []</string>
<key>end</key>
<string>\]</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.lower.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\]|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>include</key>
<string>#nest_brackets</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[qws]\{</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal incapable of interpolation -- {}</string>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.lower.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\}|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>include</key>
<string>#nest_curly</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%[qws]([^\w])</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>literal incapable of interpolation -- wildcard</string>
<key>end</key>
<string>\1</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.literal.lower.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>comment</key>
<string>Cant be named because its not neccesarily an escape.</string>
<key>match</key>
<string>\\.</string>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.constant.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>symbols</string>
<key>match</key>
<string>(?&lt;!:)(:)(?&gt;[a-zA-Z_]\w*(?&gt;[?!]|=(?![&gt;=]))?|===?|&gt;[&gt;=]?|&lt;[&lt;=]?|&lt;=&gt;|[%&amp;`/\|]|\*\*?|=?~|[-+]@?|\[\]=?|@@?[a-zA-Z_]\w*)</string>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.constant.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>symbols</string>
<key>match</key>
<string>(?&gt;[a-zA-Z_]\w*(?&gt;[?!])?)(:)(?!:)</string>
<key>name</key>
<string>constant.other.symbol.ruby.19syntax</string>
</dict>
<dict>
<key>begin</key>
<string>^=begin</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>multiline comments</string>
<key>end</key>
<string>^=end</string>
<key>name</key>
<string>comment.block.documentation.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>(^[ \t]+)?(?=#)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.whitespace.comment.leading.ruby</string>
</dict>
</dict>
<key>end</key>
<string>(?!\G)</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>#</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\n</string>
<key>name</key>
<string>comment.line.number-sign.ruby</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>
matches questionmark-letters.
examples (1st alternation = hex):
?\x1 ?\x61
examples (2nd alternation = octal):
?\0 ?\07 ?\017
examples (3rd alternation = escaped):
?\n ?\b
examples (4th alternation = meta-ctrl):
?\C-a ?\M-a ?\C-\M-\C-\M-a
examples (4th alternation = normal):
?a ?A ?0
?* ?" ?(
?. ?#
the negative lookbehind prevents against matching
p(42.tainted?)
</string>
<key>match</key>
<string>(?&lt;!\w)\?(\\(x\h{1,2}(?!\h)\b|0[0-7]{0,2}(?![0-7])\b|[^x0MC])|(\\[MC]-)+\w|[^\s\\])</string>
<key>name</key>
<string>constant.numeric.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>^__END__\n</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>string.unquoted.program-block.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>__END__ marker</string>
<key>contentName</key>
<string>text.plain</string>
<key>end</key>
<string>(?=not)impossible</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?=&lt;?xml|&lt;(?i:html\b)|!DOCTYPE (?i:html\b))</string>
<key>end</key>
<string>(?=not)impossible</string>
<key>name</key>
<string>text.html.embedded.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>text.html.basic</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)HTML)\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded html</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.html</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)HTML)\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>text.html</string>
<key>end</key>
<string>\s*\2$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>text.html.basic</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)SQL)\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded sql</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.sql</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)SQL)\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>source.sql</string>
<key>end</key>
<string>\s*\2$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>source.sql</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)CSS)\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded css</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.css</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)CSS)\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>source.css</string>
<key>end</key>
<string>\s*\2$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>source.css</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)CPP)\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded c++</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.c++</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)CPP)\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>source.c++</string>
<key>end</key>
<string>\s*\2$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>source.c++</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)C)\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded c</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.c</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)C)\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>source.c</string>
<key>end</key>
<string>\s*\2$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>source.c</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)(?:JS|JAVASCRIPT))\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded javascript</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.js</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)(?:JS|JAVASCRIPT))\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>source.js</string>
<key>end</key>
<string>\s*\2$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>source.js</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)JQUERY)\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded jQuery javascript</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.js.jquery</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)JQUERY)\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>source.js.jquery</string>
<key>end</key>
<string>\s*\2$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>source.js.jquery</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded shell</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.shell</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>source.shell</string>
<key>end</key>
<string>\s*\2$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>source.shell</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)LUA)\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded lua</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.lua</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)LUA)\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>source.lua</string>
<key>end</key>
<string>\s*\2$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>source.lua</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;-("?)((?:[_\w]+_|)RUBY)\b\1))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>Heredoc with embedded ruby</string>
<key>end</key>
<string>^\1$</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;-(\w+))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>heredoc with indented terminator</string>
<key>end</key>
<string>\s*\1$</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=\{|do|\{\s|do\s)(\|)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.variable.ruby</string>
</dict>
</dict>
<key>end</key>
<string>(\|)</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>[_a-zA-Z][_a-zA-Z0-9]*</string>
<key>name</key>
<string>variable.other.block.ruby</string>
</dict>
<dict>
<key>match</key>
<string>,</string>
<key>name</key>
<string>punctuation.separator.variable.ruby</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>=&gt;</string>
<key>name</key>
<string>punctuation.separator.key-value</string>
</dict>
<dict>
<key>match</key>
<string>&lt;&lt;=|%=|&amp;=|\*=|\*\*=|\+=|\-=|\^=|\|{1,2}=|&lt;&lt;</string>
<key>name</key>
<string>keyword.operator.assignment.augmented.ruby</string>
</dict>
<dict>
<key>match</key>
<string>&lt;=&gt;|&lt;(?!&lt;|=)|&gt;(?!&lt;|=|&gt;)|&lt;=|&gt;=|===|==|=~|!=|!~|(?&lt;=[ \t])\?</string>
<key>name</key>
<string>keyword.operator.comparison.ruby</string>
</dict>
<dict>
<key>match</key>
<string>(?&lt;=[ \t])!+|\bnot\b|&amp;&amp;|\band\b|\|\||\bor\b|\^</string>
<key>name</key>
<string>keyword.operator.logical.ruby</string>
</dict>
<dict>
<key>match</key>
<string>(%|&amp;|\*\*|\*|\+|\-|/)</string>
<key>name</key>
<string>keyword.operator.arithmetic.ruby</string>
</dict>
<dict>
<key>match</key>
<string>=</string>
<key>name</key>
<string>keyword.operator.assignment.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\||~|&gt;&gt;</string>
<key>name</key>
<string>keyword.operator.other.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\.|::</string>
<key>name</key>
<string>punctuation.separator.method.ruby</string>
</dict>
<dict>
<key>match</key>
<string>:</string>
<key>name</key>
<string>punctuation.separator.other.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\;</string>
<key>name</key>
<string>punctuation.separator.statement.ruby</string>
</dict>
<dict>
<key>match</key>
<string>,</string>
<key>name</key>
<string>punctuation.separator.object.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\{</string>
<key>name</key>
<string>punctuation.section.scope.begin.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\}</string>
<key>name</key>
<string>punctuation.section.scope.end.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\[</string>
<key>name</key>
<string>punctuation.section.array.begin.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\]</string>
<key>name</key>
<string>punctuation.section.array.end.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\(|\)</string>
<key>name</key>
<string>punctuation.section.function.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=[^\.]\.|::)(?=[a-zA-Z][a-zA-Z0-9_!?]*[^a-zA-Z0-9_!?])</string>
<key>end</key>
<string>(?&lt;=[a-zA-Z0-9_!?])(?=[^a-zA-Z0-9_!?])</string>
<key>name</key>
<string>meta.function-call.method.without-arguments.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#known_function_names</string>
</dict>
<dict>
<key>match</key>
<string>([a-zA-Z][a-zA-Z0-9_!?]*)(?=[^a-zA-Z0-9_!?])</string>
<key>name</key>
<string>entity.name.function.ruby</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=[^\.])(?=(\.|::)[a-zA-Z][a-zA-Z0-9_!?]*\()(\.|::)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.method.ruby</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\))</string>
<key>name</key>
<string>meta.function-call.method.with-arguments.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#nest_function_parens</string>
</dict>
<dict>
<key>include</key>
<string>#known_function_names</string>
</dict>
<dict>
<key>match</key>
<string>([a-zA-Z][a-zA-Z0-9_!?]*)(?=\()</string>
<key>name</key>
<string>entity.name.function.ruby</string>
</dict>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=[a-zA-Z0-9_!?]+\()</string>
<key>end</key>
<string>(?&lt;=\))</string>
<key>name</key>
<string>meta.function-call.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#nest_function_parens</string>
</dict>
<dict>
<key>include</key>
<string>#known_function_names</string>
</dict>
<dict>
<key>match</key>
<string>([a-zA-Z0-9_!?]+)(?=\()</string>
<key>name</key>
<string>entity.name.function.ruby</string>
</dict>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#leading-space</string>
</dict>
<dict>
<key>comment</key>
<string>This is kindof experimental. There really is no way to perfectly match all regular variables, but you can pretty well assume that any normal word in certain curcumstances that havnt already been scoped as something else are probably variables, and the advantages beat the potential errors</string>
<key>match</key>
<string>((?&lt;=\W)\b|^)\w+\b(?=\s*([\]\)\}\=\+\-\*\/\^\$\,\.]|&lt;\s|&lt;&lt;[\s|\.]))</string>
<key>name</key>
<string>variable.other.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\b(abort_on_exception=|absolute\?|acos!|acosh!|add!|add\?|alive\?|all\?|any\?|asin!|asinh!|async=|atan!|atan2!|atanh!|attributes=|autoload\?|avail_out=|beginning_of_line\?|between\?|block_given\?|blockdev\?|bol\?|capitalize!|casefold\?|changed\?|chardev\?|charset=|chomp!|chop!|close!|closed\?|closed_read\?|closed_write\?|codepage=|collect!|comment=|compact!|const_defined\?|coredump\?|cos!|cosh!|critical=|data=|dataType=|datetime_format=|debug\?|default=|delete!|delete\?|directory\?|dn=|downcase!|dst\?|egid=|eid=|empty\?|enclosed\?|end\?|ended\?|eof\?|eos\?|eql\?|eqn\?|equal\?|error\?|event\?|exclude_end\?|executable\?|executable_real\?|exist\?|exists\?|exit!|exited\?|euid=|exp!|extensions=|fatal\?|file\?|filter=|finished\?|finite\?|flatten!|fnmatch\?|fragment=|frozen\?|fu_have_symlink\?|fu_world_writable\?|gid=|gmt\?|gregorian_leap\?|groups=|grpowned\?|gsub!|has_key\?|has_value\?|headers=|hierarchical\?|host=|identical\?|include\?|infinite\?|info\?|input\?|instance_of\?|integer\?|is_a\?|iterator\?|julian_leap\?|key\?|kind_of\?|java_annotation|java_implements|java_kind_of?|java_name|java_package|java_require|java_signature|javax|leap\?|level=|lineno=|locked\?|log!|log10!|log=|lstrip!|map!|match\?|matched\?|max=|maxgroups=|member\?|merge!|method_defined\?|mountpoint\?|multipart\?|mtime=|multipart\?|nan\?|new!|next!|next\?|nil\?|nodeTypedValue=|nodeValue=|nonzero\?|normalize!|ns\?|ondataavailable=|onreadystatechange=|ontransformnode=|opaque=|optional\?|orig_name=|os\?|output\?|owned\?|params=|password=|path=|pipe\?|pointer=|port=|pos=|power!|preserveWhiteSpace=|priority=|private_method_defined\?|proper_subset\?|proper_superset\?|protected_method_defined\?|public_method_defined\?|query=|re_exchangeable\?|readable\?|readable_real\?|registry=|regular\?|reject!|relative\?|resolveExternals=|respond_to\?|rest\?|retval\?|reverse!|root\?|rstrip!|run\?|run=|scheme=|scope=|secure=|setgid\?|setuid\?|sid_available\?|signaled\?|sin!|singular\?|sinh!|size\?|slice!|socket\?|sort!|sqrt!|square\?|squeeze!|sticky\?|stop\?|stopped\?|stream_end\?|string=|strip!|sub!|subset\?|succ!|success\?|superset\?|swapcase!|symlink\?|sync=|sync_point\?|tainted\?|tan!|tanh!|text=|to=|tr!|tr_s!|tty\?|typecode=|uid=|uniq!|upcase!|uptodate\?|url=|user=|userinfo=|utc\?|valid_civil\?|valid_commercial\?|valid_jd\?|valid_ordinal\?|valid_time\?|validateOnParse=|value=|value\?|visible\?|warn\?|writable\?|writable_real\?|zero\?)|\b(__getobj__|__id__|__init__|__send__|__setobj__|_dump|_getproperty|_id2ref|_invoke|_load|_setproperty|abbrev|abort_on_exception|abort|abs2|absoluteChildNumber|absolute|abs|acosh|acos|add_builtin_type|add_domain_type|add_finalizer|add_observer|add_private_type|add_ruby_type|add|adler32|adler|ajd_to_amjd|ajd_to_jd|ajd|a|all_symbols|all_waits|allocate|amjd_to_ajd|amjd|ancestorChildNumber|ancestors|angle|appendChild|appendData|append_features|args|arg|arity|asctime|asinh|asin|assoc|async|at_exit|atan2|atanh|atan|atime|attributes|at|autoload|avail_in|avail_out|b64encode|backtrace|baseName|basename|base|benchmark|binding|bind|binmode|blksize|blockquote|blocks|bmbm|bm|broadcast|build2|build|call_finalizer|callcc|caller|call|capitalize|caption|captures|casecmp|cd|ceil|center|change_privilege|changed|charset_map|charset|chdir|check_until|checkbox_group|checkbox|check|childNodes|childNumber|children|chmod_R|chmod|chomp|chop|chown_R|chown|chroot|chr|civil_to_jd|civil|class_eval|class_name|class_variable_get|class_variable_set|class_variables|classify|class|cleanpath|clear|cloneNode|clone|close_read|close_write|close|cmp|codepage|coerce|collect2|collect|column_size|column_vector|column_vectors|columns|column|comment|commercial_to_jd|commercial|commit|compact|compare_by_row_vectors|compare_by|compare_file|compare_stream|compile|component_ary|component|concat|conj|conjugate|connect|const_get|const_load|const_missing|const_set|constants|conv|copy_entry|copy_file|copy_stream|copy|cosh|cos|count_observers|count|covector|cp_r|cp|crc32|crc_table|crc|createAttribute|createCDATASection|createComment|createDocumentFragment|createElement|createEntityReference|createNode|createProcessingInstruction|createTextNode|create_docfile|create_win32ole_makefile|critical|crypt|ctime|current|cwday|cweek|cwyear|dataType|data_type|data|datetime_format|day_fraction|day_fraction_to_time|day|debug|decode64|decode_b|decode|def_delegator|def_delegators|def_instance_delegator|def_instance_delegators|def_singleton_delegator|def_singleton_delegators|default_handler|default_port|default_proc|default|define_class|define_finalizer|define_define_define_instance_variables|define_method|define_method_missing|define_module|definition|deflate|deleteData|delete_at|delete_if|delete_observer|delete_observers|delete|denominator|depth|deq|detach|detect|detect_implicit|determinant|det|dev_major|dev_minor|dev|diagonal|difference|dir_foreach|dirname|disable|dispid|display|divide|divmod|div|dn|doctype|documentElement|downcase|downto|dump_stream|dump|dup|each2|each_byte|each_cons|each_document|each_entry|each_filename|each_index|each_key|each_line|each_node|each_object|each_pair|each_slice|each_value|each_with_index|each|eid|elements|emitter|enable|enclose|encode64|encode|end|england|enq|entities|entries|enum_cons|enum_for|enum_slice|enum_with_index|eof|erfc|erf|errno|errorCode|error|escapeElement|escapeHTML|escape|euid|eval|event_interface|exception|exclusive|exclusive_unlock|exec|exit_value|exitstatus|exit|expand_path|exp|extend_object|extended|extensions|extname|extract|failed|fail|fatal|fcntl|fetch|file_field|fileno|filepos|fill|filter|finalizers|find_all|find|finish|first|firstChild|flatten_merge|flatten|flock|floor|flush_next_in|flush_next_out|flush|fnmatch|for_fd|foreachline|foreach|fork|format|formatDate|formatIndex|formatNumber|formatTime|form|freeze|frexp|fsync|ftype|garbage_collect|gcdlcm|gcd|generate_args|generate_argtype|generate_argtypes|generate_class|generate_constants|generate_func_methods|generate_method_args_help|generate_method_body|generate_method_help|generate_methods|generate_method|generate_properties_with_args|generate_propget_methods|generate_propput_methods|generate_propputref_methods|generate|generic_parser|getAllResponseHeaders|getAttribute|getAttributeNode|getElementsByTagName|getNamedItem|getQualifiedItem|getResponseHeader|get_byte|getbyte|getch|getc|getegid|geteuid|getgid|getgm|getlocal|getpgid|getpgrp|getpriority|gets|getuid|getutc|getwd|gid|global_variables|glob|gmt_offset|gmtime|gmtoff|gm|grant_privilege|gregorian|grep|groups|group|gsub|guess1|guess2|guess_old|guess|guid|handler1|handler2|handler3|hasChildNodes|hasFeature|hash|header|helpcontext|helpfile|helpstring|hex|hidden|hour|html_escape|html|httpdate|hypot|h|iconv|id2name|identity|id|imag|image_button|image|img|implementation|im|included_modules|included|indexes|index|indices|induced_from|inflate|info|inherited|init_elements|initgroups|initialize_copy|inject|inner_product|ino|insertBefore|insertData|insert|inspect|install|instance_eval|instance_method|instance_methods|instance_variable_get|instance_variable_set|instance_variables|intern|intersection|inverse|inverse_from|invert|invkind|invoke|invoke_kind|inv|ioctl|isatty|isdst|iseuc|iso8601|issetugid|issjis|isutf8|italy|item|jd_to_ajd|jd_to_civil|jd_to_commercial|jd_to_ld|jd_to_mjd|jd_to_ordinal|jd_to_wday|jd|join_nowait|join|julian|kcode|kconv|keys|kill|lambda|lastChild|last_match|last|lchmod|lchown|lcm|ld_to_jd|ldexp|ld|length|level|lineno|linepos|line|link|listup|list|ljust|ln_s|ln_sf|ln|loadXML|load_documents|load_file|load_stream|load|local_variables|localtime|local|lock|log10|log|lstat|lstrip|main|major_version|make_link|make_symlink|makedirs|map2|map|marshal_dump|marshal_load|matched|matched_size|matchedsize|match|maxgroups|max|mday|measure|members|memberwise|merge|message_message|method_added|method_missing|method_removed|method_undefined|methods|method|minor|minor_version|min|mjd_to_jd|mjd|mkdir_p|mkdir|mkpath|mktime|mode|module_eval|modulo|month|mon|move|mtime|multipart_form|must_C_version|mv|namespaceURI|name|navigate|nesting|new2|new_start|nextNode|nextSibling|next_wait|next|nitems|nkf|nlink|nodeFromID|nodeName|nodeType|nodeTypeString|nodeTypedValue|nodeValue|normalize|notationName|notations|notify_observers|now|num_waiting|numerator|object_id|object_maker|oct|offset_vtbl|offset|ole_classes|ole_free|ole_func_methods|ole_get_methods|ole_method|ole_method_help|ole_methods|ole_obj_help|ole_put_methods|ole_reference_count|ole_show_help|ole_type_detail|ole_type|oletypelib_name|on_event_with_outargs|on_event|ondataavailable|onreadystatechange|opendir|open|options|ordinal_to_jd|ordinal|orig_name|os_code|out|ownerDocument|pack|params|parentNode|parent|parseError|parse_documents|parse_file|parsed|parser|parse|partition|password|password_field|pass|path|peek|peep|pid|pipe|pointer|polar|popen|popup_menu|pop|post_match|pos|ppid|pre_match|prec_f|prec_i|prec|prefix|preserveWhiteSpace|pretty|previousSibling|printf|print|priority|private_class_method|private_instance_methods|private_methods|proc|progids|progid|protected_instance_methods|protected_methods|prune|publicId|public_class_method|public_instance_methods|public_methods|push|putc|puts|pwd|p|quick_emit|quote|quo|radio_button|radio_group|rand|rank|rassoc|raw_cookie|raw_cookie2|rdev_major|rdev_minor|rdev|rdiv|re_exchange|read_type_class|readchar|readlines|readline|readlink|readpartial|readyState|read|realpath|realtime|real|reason|reduce|regexp|rehash|reject|relative_path_from|remainder|removeAttribute|removeAttributeNode|removeChild|removeNamedItem|removeQualifiedItem|remove_class_variable|remove_const|remove_dir|remove_entry_secure|remove_entry|remove_file|remove_finalizer|remove_instance_variable|remove_method|remove|rename|reopen|replaceChild|replaceData|replace|request_uri|require|reset|resolveExternals|resolver|responseBody|responseStream|responseText|responseXML|rest_size|restore|restsize|rest|result|return_type_detail|return_type|return_vtype|reverse_each|reverse|rewind|rfc1123_date|rfc2822|rfc822|rid|rindex|rjust|rm_f|rm_rf|rm_r|rmdir|rmtree|rm|roots|root|round|route_from|route_to|row_size|row_vector|row_vectors|rows|row|rpower|rstrip|run|r|safe_level|safe_unlink|save|scalar|scan_full|scan_until|scan|scope|scrolling_list|search_full|sec|seek|selectNodes|selectSingleNode|select|send|setAttribute|setAttributeNode|setNamedItem|setRequestHeader|set_attributes|set_backtrace|set_dictionary|set_dn|set_eoutvar|set_extensions|set_filter|set_fragment|set_headers|set_host|set_log|set_opaque|set_password|set_path|set_port|set_query|set_registry|set_scheme|set_scope|set_to|set_trace_func|set_typecode|set_user|set_userinfo|setegid|seteuid|setgid|setpgid|setpgrp|setpriority|setproperty|setregid|setresgid|setresuid|setreuid|setrgid|setruid|setsid|setuid|setup|shellwords|shift|signal|sin|singleton_method_added|singleton_method_removed|singleton_method_undefined|singleton_methods|sinh|size_opt_params|size_params|size|skip_until|skip|sleep|slice|sort_by|sort|source|specified|split|splitText|sprintf|sqrt|squeeze|srand|srcText|src_type|start|status|statusText|stat|step|stop_msg_stopsig|stop|store|strftime|string|strip|strptime|sub|submit|substringData|subtract|succ|success|sum|superclass|swapcase|switch|symlink|synchronize|sync|syscall|sysopen|sysread|sysseek|systemId|system|syswrite|tagName|tagurize|taint|tanh|tan|target|teardown|tell|terminate|termsig|test__invoke|test_bracket_equal_with_arg|test_class_to_s|test_const_CP_ACP|test_const_CP_MACCP|test_const_CP_OEMCP|test_const_CP_SYMBOL|test_const_CP_THREAD_ACP|test_const_CP_UTF7|test_const_CP_UTF8|test_convert_bignum|test_dispid|test_each|test_event|test_event_interface|test_get_win32ole_object|test_helpcontext|test_helpfile|test_helpstring|test_input|test_invoke_kind|test_invoke|test_name|test_no_exist_property|test_offset_vtbl|test_ole_func_methods|test_ole_get_methods|test_ole_invoke_with_named_arg|test_ole_invoke_with_named_arg_last|test_ole_method_help|test_ole_methods|test_ole_put_methods|test_ole_type|test_ole_type_detail|test_on_event|test_on_event2|test_on_event3|test_on_event4|test_openSchema|test_optional|test_output|test_return_type|test_return_type_detail|test_return_vtype|test_s_codepage|test_s_codepage_changed|test_s_codepage_set|test_s_connect|test_s_const_load|test_s_test_s_new_DCOM|test_s_new_from_clsid|test_s_ole_classes|test_s_progids|test_s_typelibs|test_setproperty|test_setproperty_bracket|test_setproperty_with_equal|test_src_type|test_to_s|test_typekind|test_value|test_variables|test_variant|test_visible|test|text_field|textarea|text|time_to_day_fraction|timeout|times|tmpdir|to_ary|to_a|to_enum|to_f|to_hash|to_int|to_io|to_i|to_mailtext|to_proc|to_rfc822text|to_r|to_set|to_str|to_sym|to_s|today|toeuc|tojis|tosjis|total_in|total_out|touch|toutf16|toutf8|tr_s|trace_var|trace|transaction|transfer|transformNode|transformNodeToObject|transpose|trap|truncate|try_implicit|try_lock|tr|tv_sec|tv_usec|typekind|typelibs|type|t|uid|umask|unbind|undef_method|undefine_finalizer|unescapeElement|unescapeHTML|unescape|ungetc|union|uniqueID|uniq|unknown|unlink|unlock|unpack|unscan|unshift|untaint|untrace_var|unused|upcase|update|upto|url_encode|url|use_registry|usec|userinfo|user|utc_offset|utc|utime|u|validateOnParse|values_at|values|value|variable_kind|variables|varkind|version|wait2|waitall|waitpid|waitpid2|wait|wakeup|warn|wday|wrap|write|xmlschema|xml|yday|year|yield|zero|zip|zlib_version|zone_offset|zone)\b</string>
<key>name</key>
<string>support.function.core.ruby</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>escaped_char</key>
<dict>
<key>match</key>
<string>\\(?:[0-7]{1,3}|x[\da-fA-F]{1,2}|.)</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<key>heredoc</key>
<dict>
<key>begin</key>
<string>^&lt;&lt;-?\w+</string>
<key>end</key>
<string>$</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<key>interpolated_ruby</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>#\{</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.embedded.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>source.ruby</string>
<key>end</key>
<string>(\})</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.embedded.end.ruby</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>source.ruby</string>
</dict>
</dict>
<key>name</key>
<string>meta.embedded.line.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#nest_curly_and_self</string>
</dict>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.ruby</string>
</dict>
</dict>
<key>match</key>
<string>(#@)[a-zA-Z_]\w*</string>
<key>name</key>
<string>variable.other.readwrite.instance.ruby</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.ruby</string>
</dict>
</dict>
<key>match</key>
<string>(#@@)[a-zA-Z_]\w*</string>
<key>name</key>
<string>variable.other.readwrite.class.ruby</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.ruby</string>
</dict>
</dict>
<key>match</key>
<string>(#\$)[a-zA-Z_]\w*</string>
<key>name</key>
<string>variable.other.readwrite.global.ruby</string>
</dict>
</array>
</dict>
<key>nest_brackets</key>
<dict>
<key>begin</key>
<string>\[</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#nest_brackets</string>
</dict>
</array>
</dict>
<key>nest_brackets_i</key>
<dict>
<key>begin</key>
<string>\[</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_brackets_i</string>
</dict>
</array>
</dict>
<key>nest_brackets_r</key>
<dict>
<key>begin</key>
<string>\[</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>include</key>
<string>#nest_brackets_r</string>
</dict>
</array>
</dict>
<key>nest_curly</key>
<dict>
<key>begin</key>
<string>\{</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#nest_curly</string>
</dict>
</array>
</dict>
<key>nest_curly_and_self</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\{</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#nest_curly_and_self</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<key>nest_curly_i</key>
<dict>
<key>begin</key>
<string>\{</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_curly_i</string>
</dict>
</array>
</dict>
<key>nest_curly_r</key>
<dict>
<key>begin</key>
<string>\{</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>include</key>
<string>#nest_curly_r</string>
</dict>
</array>
</dict>
<key>nest_ltgt</key>
<dict>
<key>begin</key>
<string>\&lt;</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#nest_ltgt</string>
</dict>
</array>
</dict>
<key>nest_ltgt_i</key>
<dict>
<key>begin</key>
<string>\&lt;</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_ltgt_i</string>
</dict>
</array>
</dict>
<key>nest_ltgt_r</key>
<dict>
<key>begin</key>
<string>\&lt;</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>include</key>
<string>#nest_ltgt_r</string>
</dict>
</array>
</dict>
<key>nest_parens</key>
<dict>
<key>begin</key>
<string>\(</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#nest_parens</string>
</dict>
</array>
</dict>
<key>nest_parens_i</key>
<dict>
<key>begin</key>
<string>\(</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#nest_parens_i</string>
</dict>
</array>
</dict>
<key>nest_parens_r</key>
<dict>
<key>begin</key>
<string>\(</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>include</key>
<string>#nest_parens_r</string>
</dict>
</array>
</dict>
<key>regex_sub</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.arbitrary-repitition.ruby</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.arbitrary-repitition.ruby</string>
</dict>
</dict>
<key>match</key>
<string>(\{)\d+(,\d+)?(\})</string>
<key>name</key>
<string>string.regexp.arbitrary-repitition.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\[(?:\^?\])?</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.character-class.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>name</key>
<string>string.regexp.character-class.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.group.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>name</key>
<string>string.regexp.group.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=^|\s)(#)\s(?=[[a-zA-Z0-9,. \t?!-][^\x{00}-\x{7F}]]*$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.</string>
<key>end</key>
<string>$\n?</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.ruby</string>
</dict>
</dict>
<key>name</key>
<string>comment.line.number-sign.ruby</string>
</dict>
</array>
</dict>
<key>known_function_names</key>
<dict>
<key>match</key>
<string>\b(abort_on_exception=|absolute\?|acos!|acosh!|add!|add\?|alive\?|all\?|any\?|asin!|asinh!|async=|atan!|atan2!|atanh!|attributes=|autoload\?|avail_out=|beginning_of_line\?|between\?|block_given\?|blockdev\?|bol\?|capitalize!|casefold\?|changed\?|chardev\?|charset=|chomp!|chop!|close!|closed\?|closed_read\?|closed_write\?|codepage=|collect!|comment=|compact!|const_defined\?|coredump\?|cos!|cosh!|critical=|data=|dataType=|datetime_format=|debug\?|default=|delete!|delete\?|directory\?|dn=|downcase!|dst\?|egid=|eid=|empty\?|enclosed\?|end\?|ended\?|eof\?|eos\?|eql\?|eqn\?|equal\?|error\?|event\?|exclude_end\?|executable\?|executable_real\?|exist\?|exists\?|exit!|exited\?|euid=|exp!|extensions=|fatal\?|file\?|filter=|finished\?|finite\?|flatten!|fnmatch\?|fragment=|frozen\?|fu_have_symlink\?|fu_world_writable\?|gid=|gmt\?|gregorian_leap\?|groups=|grpowned\?|gsub!|has_key\?|has_value\?|headers=|hierarchical\?|host=|identical\?|include\?|infinite\?|info\?|input\?|instance_of\?|integer\?|is_a\?|iterator\?|julian_leap\?|key\?|kind_of\?|java_annotation|java_implements|java_kind_of?|java_name|java_package|java_require|java_signature|javax|leap\?|level=|lineno=|locked\?|log!|log10!|log=|lstrip!|map!|match\?|matched\?|max=|maxgroups=|member\?|merge!|method_defined\?|mountpoint\?|multipart\?|mtime=|multipart\?|nan\?|new!|next!|next\?|nil\?|nodeTypedValue=|nodeValue=|nonzero\?|normalize!|ns\?|ondataavailable=|onreadystatechange=|ontransformnode=|opaque=|optional\?|orig_name=|os\?|output\?|owned\?|params=|password=|path=|pipe\?|pointer=|port=|pos=|power!|preserveWhiteSpace=|priority=|private_method_defined\?|proper_subset\?|proper_superset\?|protected_method_defined\?|public_method_defined\?|query=|re_exchangeable\?|readable\?|readable_real\?|registry=|regular\?|reject!|relative\?|resolveExternals=|respond_to\?|rest\?|retval\?|reverse!|root\?|rstrip!|run\?|run=|scheme=|scope=|secure=|setgid\?|setuid\?|sid_available\?|signaled\?|sin!|singular\?|sinh!|size\?|slice!|socket\?|sort!|sqrt!|square\?|squeeze!|sticky\?|stop\?|stopped\?|stream_end\?|string=|strip!|sub!|subset\?|succ!|success\?|superset\?|swapcase!|symlink\?|sync=|sync_point\?|tainted\?|tan!|tanh!|text=|to=|tr!|tr_s!|tty\?|typecode=|uid=|uniq!|upcase!|uptodate\?|url=|user=|userinfo=|utc\?|valid_civil\?|valid_commercial\?|valid_jd\?|valid_ordinal\?|valid_time\?|validateOnParse=|value=|value\?|visible\?|warn\?|writable\?|writable_real\?|zero\?)|\b(__getobj__|__id__|__init__|__send__|__setobj__|_dump|_getproperty|_id2ref|_invoke|_load|_setproperty|abbrev|abort_on_exception|abort|abs2|absoluteChildNumber|absolute|abs|acosh|acos|add_builtin_type|add_domain_type|add_finalizer|add_observer|add_private_type|add_ruby_type|add|adler32|adler|ajd_to_amjd|ajd_to_jd|ajd|a|all_symbols|all_waits|allocate|amjd_to_ajd|amjd|ancestorChildNumber|ancestors|angle|appendChild|appendData|append_features|args|arg|arity|asctime|asinh|asin|assoc|async|at_exit|atan2|atanh|atan|atime|attributes|at|autoload|avail_in|avail_out|b64encode|backtrace|baseName|basename|base|benchmark|binding|bind|binmode|blksize|blockquote|blocks|bmbm|bm|broadcast|build2|build|call_finalizer|callcc|caller|call|capitalize|caption|captures|casecmp|cd|ceil|center|change_privilege|changed|charset_map|charset|chdir|check_until|checkbox_group|checkbox|check|childNodes|childNumber|children|chmod_R|chmod|chomp|chop|chown_R|chown|chroot|chr|civil_to_jd|civil|class_eval|class_name|class_variable_get|class_variable_set|class_variables|classify|class|cleanpath|clear|cloneNode|clone|close_read|close_write|close|cmp|codepage|coerce|collect2|collect|column_size|column_vector|column_vectors|columns|column|comment|commercial_to_jd|commercial|commit|compact|compare_by_row_vectors|compare_by|compare_file|compare_stream|compile|component_ary|component|concat|conj|conjugate|connect|const_get|const_load|const_missing|const_set|constants|conv|copy_entry|copy_file|copy_stream|copy|cosh|cos|count_observers|count|covector|cp_r|cp|crc32|crc_table|crc|createAttribute|createCDATASection|createComment|createDocumentFragment|createElement|createEntityReference|createNode|createProcessingInstruction|createTextNode|create_docfile|create_win32ole_makefile|critical|crypt|ctime|current|cwday|cweek|cwyear|dataType|data_type|data|datetime_format|day_fraction|day_fraction_to_time|day|debug|decode64|decode_b|decode|def_delegator|def_delegators|def_instance_delegator|def_instance_delegators|def_singleton_delegator|def_singleton_delegators|default_handler|default_port|default_proc|default|define_class|define_finalizer|define_define_define_instance_variables|define_method|define_method_missing|define_module|definition|deflate|deleteData|delete_at|delete_if|delete_observer|delete_observers|delete|denominator|depth|deq|detach|detect|detect_implicit|determinant|det|dev_major|dev_minor|dev|diagonal|difference|dir_foreach|dirname|disable|dispid|display|divide|divmod|div|dn|doctype|documentElement|downcase|downto|dump_stream|dump|dup|each2|each_byte|each_cons|each_document|each_entry|each_filename|each_index|each_key|each_line|each_node|each_object|each_pair|each_slice|each_value|each_with_index|each|eid|elements|emitter|enable|enclose|encode64|encode|end|england|enq|entities|entries|enum_cons|enum_for|enum_slice|enum_with_index|eof|erfc|erf|errno|errorCode|error|escapeElement|escapeHTML|escape|euid|eval|event_interface|exception|exclusive|exclusive_unlock|exec|exit_value|exitstatus|exit|expand_path|exp|extend_object|extended|extensions|extname|extract|failed|fail|fatal|fcntl|fetch|file_field|fileno|filepos|fill|filter|finalizers|find_all|find|finish|first|firstChild|flatten_merge|flatten|flock|floor|flush_next_in|flush_next_out|flush|fnmatch|for_fd|foreachline|foreach|fork|format|formatDate|formatIndex|formatNumber|formatTime|form|freeze|frexp|fsync|ftype|garbage_collect|gcdlcm|gcd|generate_args|generate_argtype|generate_argtypes|generate_class|generate_constants|generate_func_methods|generate_method_args_help|generate_method_body|generate_method_help|generate_methods|generate_method|generate_properties_with_args|generate_propget_methods|generate_propput_methods|generate_propputref_methods|generate|generic_parser|getAllResponseHeaders|getAttribute|getAttributeNode|getElementsByTagName|getNamedItem|getQualifiedItem|getResponseHeader|get_byte|getbyte|getch|getc|getegid|geteuid|getgid|getgm|getlocal|getpgid|getpgrp|getpriority|gets|getuid|getutc|getwd|gid|global_variables|glob|gmt_offset|gmtime|gmtoff|gm|grant_privilege|gregorian|grep|groups|group|gsub|guess1|guess2|guess_old|guess|guid|handler1|handler2|handler3|hasChildNodes|hasFeature|hash|header|helpcontext|helpfile|helpstring|hex|hidden|hour|html_escape|html|httpdate|hypot|h|iconv|id2name|identity|id|imag|image_button|image|img|implementation|im|included_modules|included|indexes|index|indices|induced_from|inflate|info|inherited|init_elements|initgroups|initialize_copy|inject|inner_product|ino|insertBefore|insertData|insert|inspect|install|instance_eval|instance_method|instance_methods|instance_variable_get|instance_variable_set|instance_variables|intern|intersection|inverse|inverse_from|invert|invkind|invoke|invoke_kind|inv|ioctl|isatty|isdst|iseuc|iso8601|issetugid|issjis|isutf8|italy|item|jd_to_ajd|jd_to_civil|jd_to_commercial|jd_to_ld|jd_to_mjd|jd_to_ordinal|jd_to_wday|jd|join_nowait|join|julian|kcode|kconv|keys|kill|lambda|lastChild|last_match|last|lchmod|lchown|lcm|ld_to_jd|ldexp|ld|length|level|lineno|linepos|(?&lt;=\.)line|link|listup|list|ljust|ln_s|ln_sf|ln|loadXML|load_documents|load_file|load_stream|load|local_variables|localtime|local|lock|log10|log|lstat|lstrip|main|major_version|make_link|make_symlink|makedirs|map2|map|marshal_dump|marshal_load|matched|matched_size|matchedsize|match|maxgroups|max|mday|measure|members|memberwise|merge|message_message|method_added|method_missing|method_removed|method_undefined|methods|method|minor|minor_version|min|mjd_to_jd|mjd|mkdir_p|mkdir|mkpath|mktime|mode|module_eval|modulo|month|mon|move|mtime|multipart_form|must_C_version|mv|namespaceURI|name|navigate|nesting|new2|new_start|nextNode|nextSibling|next_wait|next|nitems|nkf|nlink|nodeFromID|nodeName|nodeType|nodeTypeString|nodeTypedValue|nodeValue|normalize|notationName|notations|notify_observers|now|num_waiting|numerator|object_id|object_maker|oct|offset_vtbl|offset|ole_classes|ole_free|ole_func_methods|ole_get_methods|ole_method|ole_method_help|ole_methods|ole_obj_help|ole_put_methods|ole_reference_count|ole_show_help|ole_type_detail|ole_type|oletypelib_name|on_event_with_outargs|on_event|ondataavailable|onreadystatechange|opendir|open|options|ordinal_to_jd|ordinal|orig_name|os_code|out|ownerDocument|pack|params|parentNode|parent|parseError|parse_documents|parse_file|parsed|parser|parse|partition|password|password_field|pass|path|peek|peep|pid|pipe|pointer|polar|popen|popup_menu|pop|post_match|pos|ppid|pre_match|prec_f|prec_i|prec|prefix|preserveWhiteSpace|pretty|previousSibling|printf|print|priority|private_class_method|private_instance_methods|private_methods|proc|progids|progid|protected_instance_methods|protected_methods|prune|publicId|public_class_method|public_instance_methods|public_methods|push|putc|puts|pwd|p|quick_emit|quote|quo|radio_button|radio_group|rand|rank|rassoc|raw_cookie|raw_cookie2|rdev_major|rdev_minor|rdev|rdiv|re_exchange|read_type_class|readchar|readlines|readline|readlink|readpartial|readyState|read|realpath|realtime|real|reason|reduce|regexp|rehash|reject|relative_path_from|remainder|removeAttribute|removeAttributeNode|removeChild|removeNamedItem|removeQualifiedItem|remove_class_variable|remove_const|remove_dir|remove_entry_secure|remove_entry|remove_file|remove_finalizer|remove_instance_variable|remove_method|remove|rename|reopen|replaceChild|replaceData|replace|request_uri|require|reset|resolveExternals|resolver|responseBody|responseStream|responseText|responseXML|rest_size|restore|restsize|rest|result|return_type_detail|return_type|return_vtype|reverse_each|reverse|rewind|rfc1123_date|rfc2822|rfc822|rid|rindex|rjust|rm_f|rm_rf|rm_r|rmdir|rmtree|rm|roots|root|round|route_from|route_to|row_size|row_vector|row_vectors|rows|row|rpower|rstrip|run|r|safe_level|safe_unlink|save(?!!)|scalar|scan_full|scan_until|scan|scope|scrolling_list|search_full|sec|seek|selectNodes|selectSingleNode|select|send|setAttribute|setAttributeNode|setNamedItem|setRequestHeader|set_attributes|set_backtrace|set_dictionary|set_dn|set_eoutvar|set_extensions|set_filter|set_fragment|set_headers|set_host|set_log|set_opaque|set_password|set_path|set_port|set_query|set_registry|set_scheme|set_scope|set_to|set_trace_func|set_typecode|set_user|set_userinfo|setegid|seteuid|setgid|setpgid|setpgrp|setpriority|setproperty|setregid|setresgid|setresuid|setreuid|setrgid|setruid|setsid|setuid|setup|shellwords|shift|signal|sin|singleton_method_added|singleton_method_removed|singleton_method_undefined|singleton_methods|sinh|size_opt_params|size_params|size|skip_until|skip|sleep|slice|sort_by|sort|source|specified|split|splitText|sprintf|sqrt|squeeze|srand|srcText|src_type|start|status|statusText|stat|step|stop_msg_stopsig|stop|store|strftime|string|strip|strptime|sub|submit|substringData|subtract|succ|success|sum|superclass|swapcase|switch|symlink|synchronize|sync|syscall|sysopen|sysread|sysseek|systemId|system|syswrite|tagName|tagurize|taint|tanh|tan|target|teardown|tell|terminate|termsig|test__invoke|test_bracket_equal_with_arg|test_class_to_s|test_const_CP_ACP|test_const_CP_MACCP|test_const_CP_OEMCP|test_const_CP_SYMBOL|test_const_CP_THREAD_ACP|test_const_CP_UTF7|test_const_CP_UTF8|test_convert_bignum|test_dispid|test_each|test_event|test_event_interface|test_get_win32ole_object|test_helpcontext|test_helpfile|test_helpstring|test_input|test_invoke_kind|test_invoke|test_name|test_no_exist_property|test_offset_vtbl|test_ole_func_methods|test_ole_get_methods|test_ole_invoke_with_named_arg|test_ole_invoke_with_named_arg_last|test_ole_method_help|test_ole_methods|test_ole_put_methods|test_ole_type|test_ole_type_detail|test_on_event|test_on_event2|test_on_event3|test_on_event4|test_openSchema|test_optional|test_output|test_return_type|test_return_type_detail|test_return_vtype|test_s_codepage|test_s_codepage_changed|test_s_codepage_set|test_s_connect|test_s_const_load|test_s_test_s_new_DCOM|test_s_new_from_clsid|test_s_ole_classes|test_s_progids|test_s_typelibs|test_setproperty|test_setproperty_bracket|test_setproperty_with_equal|test_src_type|test_to_s|test_typekind|test_value|test_variables|test_variant|test_visible|test|text_field|textarea|text|time_to_day_fraction|timeout|times|tmpdir|to_ary|to_a|to_enum|to_f|to_hash|to_int|to_io|to_i|to_mailtext|to_proc|to_rfc822text|to_r|to_set|to_str|to_sym|to_s|today|toeuc|tojis|tosjis|total_in|total_out|touch|toutf16|toutf8|tr_s|trace_var|trace|transaction|transfer|transformNode|transformNodeToObject|transpose|trap|truncate|try_implicit|try_lock|tr|tv_sec|tv_usec|typekind|typelibs|type|t|uid|umask|unbind|undef_method|undefine_finalizer|unescapeElement|unescapeHTML|unescape|ungetc|union|uniqueID|uniq|unknown|unlink|unlock|unpack|unscan|unshift|untaint|untrace_var|unused|upcase|update|upto|url_encode|url|use_registry|usec|userinfo|user|utc_offset|utc|utime|u|validateOnParse|values_at|values|value|variable_kind|variables|varkind|version|wait2|waitall|waitpid|waitpid2|wait|wakeup|warn|wday|wrap|write|xmlschema|xml|yday|year|yield|zero|zip|zlib_version|zone_offset|zone)\b</string>
<key>name</key>
<string>support.function.core.ruby</string>
</dict>
<key>leading-space</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>^(?=(\t| ))</string>
<key>end</key>
<string>(?=[^\t\s]|\n)</string>
<key>name</key>
<string>meta.leading-tabs</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group1.spaces</string>
</dict>
<key>10</key>
<dict>
<key>name</key>
<string>meta.even-tab.group10.spaces</string>
</dict>
<key>11</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group11.spaces</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>meta.even-tab.group2.spaces</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group3.spaces</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>meta.even-tab.group4.spaces</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group5.spaces</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>meta.even-tab.group6.spaces</string>
</dict>
<key>7</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group7.spaces</string>
</dict>
<key>8</key>
<dict>
<key>name</key>
<string>meta.even-tab.group8.spaces</string>
</dict>
<key>9</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group9.spaces</string>
</dict>
</dict>
<key>match</key>
<string>( )( )?( )?( )?( )?( )?( )?( )?( )?( )?( )?</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group1.tab</string>
</dict>
<key>10</key>
<dict>
<key>name</key>
<string>meta.even-tab.group10.tab</string>
</dict>
<key>11</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group11.tab</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>meta.even-tab.group2.tab</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group3.tab</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>meta.even-tab.group4.tab</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group5.tab</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>meta.even-tab.group6.tab</string>
</dict>
<key>7</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group7.tab</string>
</dict>
<key>8</key>
<dict>
<key>name</key>
<string>meta.even-tab.group8.tab</string>
</dict>
<key>9</key>
<dict>
<key>name</key>
<string>meta.odd-tab.group9.tab</string>
</dict>
</dict>
<key>match</key>
<string>(\t)(\t)?(\t)?(\t)?(\t)?(\t)?(\t)?(\t)?(\t)?(\t)?(\t)?</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>nest_function_parens</key>
<dict>
<key>begin</key>
<string>\(</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.scope.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>meta.section.scope.ruby</string>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#nest_function_parens</string>
</dict>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.ruby</string>
<key>uuid</key>
<string>E00B62AC-6B1C-11D9-9B1F-000D93589AF6</string>
</dict>
</plist>
@renanra
Copy link

renanra commented Oct 20, 2013

Great! It just does the trick.

@MattDMo
Copy link

MattDMo commented Dec 2, 2013

Have you considered putting this on Package Control? If so, I have a couple of suggestions:

  1. Don't name it RubyNext.tmLanguage, just call it RubyNext or something similar. Sublime may choke if a directory name is the same as a file name.
  2. Feel free (if you haven't already, I didn't check) to include and improve on my revisions adding support for the %i[foo bar] # [:foo :bar] symbol array literal notation.
  3. In order for this to coexist with the existing Ruby.tmLanguage, you'll need to change the UUID. Here's one, free of charge 😀 : BF82A477-650C-46A4-9422-6CE8D9636E97
  4. Advertise heavily on the Sublime forum and you'll likely get lots of suggestions and (hopefully) contributions. I published Python Improved a month or two ago, and have been amazed at the feedback - people really are looking for up-to-date versions of their favorite language definitions, and with the popularity of Ruby and Rails I'm sure you'll get a ton of installs.

Good luck!
Matt

@vossaustin
Copy link

The discrepancy between the actual Base 16 syntax highlighting and the preview was frustrating. Thank you!

@shunwen
Copy link

shunwen commented May 6, 2014

Typo in line 45 "precedOence"?

@ravgoundar
Copy link

Noob here. How do I install this?

@jeremymoritz
Copy link

To install this on a Mac...

  1. Download the "RubyNext.tmLanguage" file
  2. Open Sublime Text 3
  3. Click Preferences > Browse Packages...
  4. Put the "RubyNext.tmLanguage" file into "User" Directory
  5. Click View > Syntax Highlighting > "Open All With Current Extension as..." > Better Ruby

I don't know why it's not called "RubyNext"... i just renamed mine so that i would find it more easily (who would've thought to look in the "B"s for this?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment