annotate vendor/vim-syntax/ruby.vim @ 521:fb2d37acca81

Reducing bashism.
author edogawaconan <me@myconan.net>
date Wed, 18 Jun 2014 16:08:22 +0900
parents bbcffc594d1e
children 0e72765944d4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
508
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
1 " Vim syntax file
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
2 " Language: Ruby
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
4 " URL: https://github.com/vim-ruby/vim-ruby
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
5 " Release Coordinator: Doug Kearns <dougkearns@gmail.com>
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
6 " ----------------------------------------------------------------------------
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
7 "
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 " Previous Maintainer: Mirko Nasato
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
9 " Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN)
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
10 " ----------------------------------------------------------------------------
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
11
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
12 if exists("b:current_syntax")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
13 finish
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
14 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
15
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
16 if has("folding") && exists("ruby_fold")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
17 setlocal foldmethod=syntax
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
18 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
19
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
20 syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyExceptional,rubyMethodExceptional,rubyTodo
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
21
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
22 if exists("ruby_space_errors")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
23 if !exists("ruby_no_trail_space_error")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
24 syn match rubySpaceError display excludenl "\s\+$"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
25 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
26 if !exists("ruby_no_tab_space_error")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
27 syn match rubySpaceError display " \+\t"me=e-1
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
28 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
29 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
30
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
31 " Operators
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
32 if exists("ruby_operators")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
33 syn match rubyOperator "[~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\*\*\|\.\.\.\|\.\.\|::"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
34 syn match rubyOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!="
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
35 syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
36 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
37
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
38 " Expression Substitution and Backslash Notation
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
39 syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
40 syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
41 syn match rubyQuoteEscape "\\[\\']" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
42
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
43 syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@rubyNotTop
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
44 syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
45 syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
46 syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
47 syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
48 syn region rubyNoInterpolation start="\\#{" end="}" contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
49 syn match rubyNoInterpolation "\\#{" display contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
50 syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
51 syn match rubyNoInterpolation "\\#\$\W" display contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
52
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
53 syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
54
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
55 syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
56 syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
57 syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
58 syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
59
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
60 " These are mostly Oniguruma ready
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
61 syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
62 syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
63 syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
64 syn match rubyRegexpCharClass "\\[DdHhSsWw]" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
65 syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
66 syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
67 syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
68 syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
69 syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
70 syn match rubyRegexpDot "\." contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
71 syn match rubyRegexpSpecial "|" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
72 syn match rubyRegexpSpecial "\\[1-9]\d\=\d\@!" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
73 syn match rubyRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
74 syn match rubyRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
75 syn match rubyRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
76 syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
77
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
78 syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
79 syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
80 syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
81
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
82 " Numbers and ASCII Codes
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
83 syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
84 syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
85 syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
86 syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
87 syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
88 syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
89 syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
90
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
91 " Identifiers
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
92 syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
93 syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
94
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
95 syn match rubyConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
96 syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
97 syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
98 syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
99 syn match rubySymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
100 syn match rubySymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
101 syn match rubySymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
102 syn match rubySymbol "[]})\"':]\@<!:\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\="
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
103 syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
104 syn match rubySymbol "[]})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="he=e-1
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
105 syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
106 syn match rubySymbol "[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="hs=s+1,he=e-1
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
107 syn region rubySymbol start="[]})\"':]\@<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
108 syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
109
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
110 syn match rubyBlockParameter "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
111 syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
112
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
113 syn match rubyInvalidVariable "$[^ A-Za-z_-]"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
114 syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]#
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
115 syn match rubyPredefinedVariable "$\d\+" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
116 syn match rubyPredefinedVariable "$_\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
117 syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
118 syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
119 syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
120 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
121 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
122 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
123 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
124
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
125 " Normal Regular Expression
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
126 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
127 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
128
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
129 " Generalized Regular Expression
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
130 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
131 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
132 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
133 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
134 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
135
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
136 " Normal String and Shell Command Output
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
137 syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
138 syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
139 syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
140
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
141 " Generalized Single Quoted String, Symbol and Array of Strings
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
142 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
143 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
144 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
145 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
146 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
147 syn region rubyString matchgroup=rubyStringDelimiter start="%q " end=" " skip="\\\\\|\\)" fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
148 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1" skip="\\\\\|\\\z1" fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
149 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
150 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
151 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
152 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
153
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
154 " Generalized Double Quoted String and Array of Strings and Shell Command Output
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
155 " Note: %= is not matched here as the beginning of a double quoted string
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
156 syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
157 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
158 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
159 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
160 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
161 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
162 syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx] " end=" " skip="\\\\\|\\)" contains=@rubyStringSpecial fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
163
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
164 " Here Document
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
165 syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
166 syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
167 syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
168 syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
169
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
170 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
171 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
172 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc fold keepend
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
173 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
174
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
175 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
176 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
177 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
178 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
179
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
180 if exists('main_syntax') && main_syntax == 'eruby'
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
181 let b:ruby_no_expensive = 1
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
182 end
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
183
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
184 syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable nextgroup=rubyAliasDeclaration2 skipwhite
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
185 syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
186 syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
187 syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
188 syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
189 syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=rubyMethodDeclaration
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
190 syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
191 syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
192
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
193 syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
194
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
195 " Keywords
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
196 " Note: the following keywords have already been defined:
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
197 " begin case class def do end for if module unless until while
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
198 syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
199 syn match rubyOperator "\<defined?" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
200 syn match rubyKeyword "\<\%(super\|yield\)\>[?!]\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
201 syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
202 syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
203 syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
204
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
205 " Expensive Mode - match 'end' with the appropriate opening keyword for syntax
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
206 " based folding and special highlighting of module/class/method definitions
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
207 if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
208 syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
209 syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
210 syn match rubyDefine "\<undef\>" nextgroup=rubyFunction skipwhite skipnl
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
211 syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
212 syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
213
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
214 syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
215 syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
216 syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
217
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
218 " modifiers
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
219 syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
220 syn match rubyRepeatModifier "\<\%(while\|until\)\>" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
221
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
222 syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
223 " curly bracket block or hash literal
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
224 syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
225 syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
226
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
227 " statements without 'do'
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
228 syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
229 syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
230 syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
231
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
232 syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
233 syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
234
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
235 syn match rubyExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyBlockExpression
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
236 syn match rubyMethodExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyMethodBlock
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
237
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
238 " statements with optional 'do'
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
239 syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
240 syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
241
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
242 if !exists("ruby_minlines")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
243 let ruby_minlines = 500
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
244 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
245 exec "syn sync minlines=" . ruby_minlines
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
246
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
247 else
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
248 syn match rubyControl "\<def\>[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
249 syn match rubyControl "\<class\>[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
250 syn match rubyControl "\<module\>[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
251 syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|end\)\>[?!]\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
252 syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
253 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
254
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
255 " Special Methods
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
256 if !exists("ruby_no_special_methods")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
257 syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant module_function
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
258 " attr is a common variable name
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
259 syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
260 syn keyword rubyAttribute attr_accessor attr_reader attr_writer
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
261 syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
262 syn keyword rubyEval eval class_eval instance_eval module_eval
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
263 syn keyword rubyException raise fail catch throw
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
264 " false positive with 'include?'
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
265 syn match rubyInclude "\<include\>[?!]\@!"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
266 syn keyword rubyInclude autoload extend load prepend require require_relative
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
267 syn keyword rubyKeyword callcc caller lambda proc
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
268 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
269
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
270 " Comments and Documentation
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
271 syn match rubySharpBang "\%^#!.*" display
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
272 syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX todo contained
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
273 syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
274 if !exists("ruby_no_comment_fold")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
275 syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
276 syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\%(\s.*\)\=$" contains=rubySpaceError,rubyTodo,@Spell fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
277 else
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
278 syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
279 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
280
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
281 " Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
282 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|and\|begin\|break\|case\|class\|def\|defined\|do\|else\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
283 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|in\|module\|next\|nil\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
284 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(not\|or\|redo\|rescue\|retry\|return\|self\|super\|then\|true\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
285 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|BEGIN\|END\|__FILE__\|__LINE__\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
286
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
287 syn match rubyKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
288 syn match rubyKeywordAsMethod "\<\%(if\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
289
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
290 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(abort\|at_exit\|attr\|attr_accessor\|attr_reader\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
291 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(attr_writer\|autoload\|callcc\|catch\|caller\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
292 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(eval\|class_eval\|instance_eval\|module_eval\|exit\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
293 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(extend\|fail\|fork\|include\|lambda\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
294 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(load\|loop\|prepend\|private\|proc\|protected\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
295 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|require_relative\|raise\|throw\|trap\)\>" transparent contains=NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
296
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
297 " __END__ Directive
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
298 syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
299
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
300 hi def link rubyClass rubyDefine
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
301 hi def link rubyModule rubyDefine
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
302 hi def link rubyMethodExceptional rubyDefine
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
303 hi def link rubyDefine Define
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
304 hi def link rubyFunction Function
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
305 hi def link rubyConditional Conditional
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
306 hi def link rubyConditionalModifier rubyConditional
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
307 hi def link rubyExceptional rubyConditional
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
308 hi def link rubyRepeat Repeat
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
309 hi def link rubyRepeatModifier rubyRepeat
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
310 hi def link rubyOptionalDo rubyRepeat
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
311 hi def link rubyControl Statement
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
312 hi def link rubyInclude Include
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
313 hi def link rubyInteger Number
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
314 hi def link rubyASCIICode Character
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
315 hi def link rubyFloat Float
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
316 hi def link rubyBoolean Boolean
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
317 hi def link rubyException Exception
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
318 if !exists("ruby_no_identifiers")
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
319 hi def link rubyIdentifier Identifier
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
320 else
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
321 hi def link rubyIdentifier NONE
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
322 endif
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
323 hi def link rubyClassVariable rubyIdentifier
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
324 hi def link rubyConstant Type
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
325 hi def link rubyGlobalVariable rubyIdentifier
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
326 hi def link rubyBlockParameter rubyIdentifier
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
327 hi def link rubyInstanceVariable rubyIdentifier
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
328 hi def link rubyPredefinedIdentifier rubyIdentifier
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
329 hi def link rubyPredefinedConstant rubyPredefinedIdentifier
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
330 hi def link rubyPredefinedVariable rubyPredefinedIdentifier
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
331 hi def link rubySymbol Constant
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
332 hi def link rubyKeyword Keyword
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
333 hi def link rubyOperator Operator
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
334 hi def link rubyBeginEnd Statement
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
335 hi def link rubyAccess Statement
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
336 hi def link rubyAttribute Statement
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
337 hi def link rubyEval Statement
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
338 hi def link rubyPseudoVariable Constant
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
339
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
340 hi def link rubyComment Comment
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
341 hi def link rubyData Comment
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
342 hi def link rubyDataDirective Delimiter
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
343 hi def link rubyDocumentation Comment
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
344 hi def link rubyTodo Todo
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
345
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
346 hi def link rubyQuoteEscape rubyStringEscape
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
347 hi def link rubyStringEscape Special
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
348 hi def link rubyInterpolationDelimiter Delimiter
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
349 hi def link rubyNoInterpolation rubyString
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
350 hi def link rubySharpBang PreProc
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
351 hi def link rubyRegexpDelimiter rubyStringDelimiter
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
352 hi def link rubySymbolDelimiter rubyStringDelimiter
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
353 hi def link rubyStringDelimiter Delimiter
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
354 hi def link rubyHeredoc rubyString
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
355 hi def link rubyString String
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
356 hi def link rubyRegexpEscape rubyRegexpSpecial
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
357 hi def link rubyRegexpQuantifier rubyRegexpSpecial
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
358 hi def link rubyRegexpAnchor rubyRegexpSpecial
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
359 hi def link rubyRegexpDot rubyRegexpCharClass
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
360 hi def link rubyRegexpCharClass rubyRegexpSpecial
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
361 hi def link rubyRegexpSpecial Special
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
362 hi def link rubyRegexpComment Comment
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
363 hi def link rubyRegexp rubyString
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
364
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
365 hi def link rubyInvalidVariable Error
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
366 hi def link rubyError Error
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
367 hi def link rubySpaceError rubyError
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
368
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
369 let b:current_syntax = "ruby"
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
370
bbcffc594d1e Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff changeset
371 " vim: nowrap sw=2 sts=2 ts=8 noet: