Mercurial > ec-dotfiles
annotate vendor/vim-syntax/ruby.vim @ 637:758ced52ee62
[vim] Fix typescript syntax
author | nanaya <me@nanaya.pro> |
---|---|
date | Tue, 14 Jan 2020 11:10:49 +0900 |
parents | ced2ee9efd9f |
children | c74dffea6a0a |
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> |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
6 " Last Change: 2019 Jul 13 |
508
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 " |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
9 " Previous Maintainer: Mirko Nasato |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
10 " 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
|
11 " ---------------------------------------------------------------------------- |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
12 |
595 | 13 " Prelude {{{1 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
14 if exists("b:current_syntax") |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
15 finish |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
16 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
17 |
595 | 18 " this file uses line continuations |
19 let s:cpo_sav = &cpo | |
20 set cpo&vim | |
21 | |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
22 " eRuby Config {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
23 if exists('main_syntax') && main_syntax == 'eruby' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
24 let b:ruby_no_expensive = 1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
25 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
26 |
595 | 27 " Folding Config {{{1 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
28 if has("folding") && exists("ruby_fold") |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
29 setlocal foldmethod=syntax |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
30 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
31 |
595 | 32 let s:foldable_groups = split( |
33 \ get( | |
34 \ b:, | |
35 \ 'ruby_foldable_groups', | |
36 \ get(g:, 'ruby_foldable_groups', 'ALL') | |
37 \ ) | |
38 \ ) | |
39 | |
40 function! s:foldable(...) abort | |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
41 if index(s:foldable_groups, 'NONE') > -1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
42 return 0 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
43 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
44 |
595 | 45 if index(s:foldable_groups, 'ALL') > -1 |
46 return 1 | |
47 endif | |
48 | |
49 for l:i in a:000 | |
50 if index(s:foldable_groups, l:i) > -1 | |
51 return 1 | |
52 endif | |
53 endfor | |
54 | |
55 return 0 | |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
56 endfunction |
595 | 57 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
58 function! s:run_syntax_fold(args) abort |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
59 let [_0, _1, groups, cmd; _] = matchlist(a:args, '\(["'']\)\(.\{-}\)\1\s\+\(.*\)') |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
60 if call('s:foldable', split(groups)) |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
61 let cmd .= ' fold' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
62 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
63 exe cmd |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
64 endfunction |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
65 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
66 com! -nargs=* SynFold call s:run_syntax_fold(<q-args>) |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
67 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
68 " Not-Top Cluster {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
69 syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
70 |
595 | 71 " Whitespace Errors {{{1 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
72 if exists("ruby_space_errors") |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
73 if !exists("ruby_no_trail_space_error") |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
74 syn match rubySpaceError display excludenl "\s\+$" |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
75 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
76 if !exists("ruby_no_tab_space_error") |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
77 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
|
78 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
79 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
80 |
595 | 81 " Operators {{{1 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
82 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
83 syn match rubyEnglishBooleanOperator "\<\%(and\|or\|not\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
84 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
85 if exists("ruby_operators") || exists("ruby_pseudo_operators") |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
86 syn match rubyDotOperator "\.\|&\." |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
87 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
88 syn match rubyTernaryOperator "\%(\w\|[^\x00-\x7F]\)\@1<!?\|:" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
89 syn match rubyArithmeticOperator "\*\*\|[*/%+]\|->\@!" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
90 syn match rubyComparisonOperator "<=>\|<=\|<\|>=\|[-=]\@1<!>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
91 syn match rubyBitwiseOperator "[~^|]\|&\.\@!\|<<\|>>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
92 syn match rubyBooleanOperator "\%(\w\|[^\x00-\x7F]\)\@1<!!\|&&\|||" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
93 syn match rubyRangeOperator "\.\.\.\=" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
94 syn match rubyAssignmentOperator "=>\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^=" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
95 syn match rubyAssignmentOperator "=>\@!" containedin=rubyBlockParameterList " TODO: this is inelegant |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
96 syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
97 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
98 syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<=\[" end="]" contains=ALLBUT,@rubyNotTop |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
99 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
100 syn match rubyScopeOperator "::" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
101 syn match rubySuperClassOperator "<" contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
102 syn match rubyEigenClassOperator "<<" contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
103 syn match rubyLambdaOperator "->" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
104 syn match rubySplatOperator "\%([[{(|,=]\_s*\)\@<=\*" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
105 syn match rubySplatOperator "\%(^\|\s\)\@1<=\*\%(\h\|[^\x00-\x7F]\|[:$@[]\)\@=" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
106 syn match rubyDoubleSplatOperator "\%([{(|,]\_s*\)\@<=\*\*" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
107 syn match rubyDoubleSplatOperator "\s\@1<=\*\*\%(\h\|[^\x00-\x7F]\|[:$@{]\)\@=" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
108 syn match rubyProcOperator "\%([[(|,]\_s*\)\@<=&" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
109 syn match rubyProcOperator "\s\@1<=&\%(\h\|[^\x00-\x7F]\|[:$@]\|->\)\@=" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
110 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
111 syn cluster rubyProperOperator contains=rubyTernaryOperator,rubyArithmeticOperator,rubyComparisonOperator,rubyBitwiseOperator,rubyBooleanOperator,rubyRangeOperator,rubyAssignmentOperator,rubyEqualityOperator,rubyDefinedOperator,rubyEnglishBooleanOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
112 syn cluster rubyClassOperator contains=rubyEigenClassOperator,rubySuperClassOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
113 syn cluster rubyPseudoOperator contains=rubyDotOperator,rubyScopeOperator,rubyEigenClassOperator,rubySuperClassOperator,rubyLambdaOperator,rubySplatOperator,rubyDoubleSplatOperator,rubyProcOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
114 syn cluster rubyOperator contains=ruby.*Operator |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
115 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
116 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
117 " String Interpolation and Backslash Notation {{{1 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
118 syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@rubyNotTop |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
119 syn match rubyInterpolation "#\$\%(-\w\|[!$&"'*+,./0:;<>?@\`~_]\|\w\+\)" display contained contains=rubyInterpolationDelimiter,@rubyGlobalVariable |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
120 syn match rubyInterpolation "#@@\=\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
121 syn match rubyInterpolationDelimiter "#\ze[$@]" display contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
122 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
123 syn match rubyStringEscape "\\\_." contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
124 syn match rubyStringEscape "\\\o\{1,3}\|\\x\x\{1,2}" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
125 syn match rubyStringEscape "\\u\%(\x\{4}\|{\x\{1,6}\%(\s\+\x\{1,6}\)*}\)" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
126 syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=.\)" contained display |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
127 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
128 syn match rubyBackslashEscape "\\\\" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
129 syn match rubyQuoteEscape "\\'" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
130 syn match rubySpaceEscape "\\ " contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
131 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
132 syn match rubyParenthesisEscape "\\[()]" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
133 syn match rubyCurlyBraceEscape "\\[{}]" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
134 syn match rubyAngleBracketEscape "\\[<>]" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
135 syn match rubySquareBracketEscape "\\[[\]]" contained display |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
136 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
137 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
|
138 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
|
139 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
|
140 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
|
141 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
142 syn cluster rubySingleCharEscape contains=rubyBackslashEscape,rubyQuoteEscape,rubySpaceEscape,rubyParenthesisEscape,rubyCurlyBraceEscape,rubyAngleBracketEscape,rubySquareBracketEscape |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
143 syn cluster rubyNestedBrackets contains=rubyNested.\+ |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
144 syn cluster rubyStringSpecial contains=rubyInterpolation,rubyStringEscape |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
145 syn cluster rubyStringNotTop contains=@rubyStringSpecial,@rubyNestedBrackets,@rubySingleCharEscape |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
146 |
595 | 147 " Regular Expression Metacharacters {{{1 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
148 syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\\\\|\\)" end=")" contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
149 syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\\\\|\\)" end=")" contained transparent contains=@rubyRegexpSpecial |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
150 syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\\\|\\\]" end="\]" contained transparent contains=rubyRegexpBrackets,rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass,rubyRegexpIntersection oneline |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
151 syn match rubyRegexpCharClass "\\[DdHhRSsWw]" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
152 syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|xdigit\):\]" contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
153 syn match rubyRegexpCharClass "\\[pP]{^\=.\{-}}" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
154 syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained " see commit e477f10 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
155 syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
156 syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
157 syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
158 syn match rubyRegexpDot "\.\|\\X" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
159 syn match rubyRegexpIntersection "&&" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
160 syn match rubyRegexpSpecial "\\K" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
161 syn match rubyRegexpSpecial "|" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
162 syn match rubyRegexpSpecial "\\[1-9]\d\=\d\@!" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
163 syn match rubyRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
164 syn match rubyRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
165 syn match rubyRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
166 syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
167 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
168 syn cluster rubyRegexpSpecial contains=@rubyStringSpecial,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment,rubyRegexpIntersection |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
169 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
170 " Numbers {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
171 syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*r\=i\=\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
172 syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)r\=i\=\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
173 syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*r\=i\=\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
174 syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*r\=i\=\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
175 syn match rubyFloat "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*r\=i\=\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
176 syn match rubyFloat "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)i\=\>" display |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
177 |
595 | 178 " Identifiers {{{1 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
179 syn match rubyClassName "\%(\%(^\|[^.]\)\.\s*\)\@<!\<[[:upper:]]\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
180 syn match rubyModuleName "\%(\%(^\|[^.]\)\.\s*\)\@<!\<[[:upper:]]\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
181 syn match rubyConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<[[:upper:]]\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
182 syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
183 syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
184 syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
185 syn match rubySymbolDelimiter ":" contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
186 syn match rubySymbol "[]})\"':]\@1<!:\%(\^\|\~@\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!@\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" contains=rubySymbolDelimiter |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
187 syn match rubySymbol "[]})\"':]\@1<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" contains=rubySymbolDelimiter |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
188 syn match rubySymbol "[]})\"':]\@1<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contains=rubySymbolDelimiter |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
189 syn match rubySymbol "[]})\"':]\@1<!:\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\=" contains=rubySymbolDelimiter |
595 | 190 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
191 SynFold ':' syn region rubySymbol matchgroup=rubySymbolDelimiter start="[]})\"':]\@1<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,rubyBackslashEscape |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
192 SynFold ':' syn region rubySymbol matchgroup=rubySymbolDelimiter start="[]})\"':]\@1<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
193 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
194 syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@=" |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
195 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
196 syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop containedin=rubyBlockParameterList |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
197 syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" contains=ALLBUT,@rubyNotTop,@rubyProperOperator |
595 | 198 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
199 if exists('ruby_global_variable_error') |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
200 syn match rubyGlobalVariableError "$[^A-Za-z_]" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
201 syn match rubyGlobalVariableError "$-[^0FIKWadilpvw]" display |
595 | 202 endif |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
203 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
204 syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<>?@\`~]# |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
205 syn match rubyPredefinedVariable "$\d\+" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
206 syn match rubyPredefinedVariable "$_\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
207 syn match rubyPredefinedVariable "$-[0FIWadilpvw]\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
208 syn match rubyPredefinedVariable "$\%(stderr\|stdin\|stdout\)\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
209 syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
210 syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(ARGF\|ARGV\|ENV\|DATA\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\)\>\%(\s*(\)\@!" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
211 syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
212 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
213 " Deprecated/removed in 1.9 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
214 syn match rubyPredefinedVariable "$=" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
215 syn match rubyPredefinedVariable "$-K\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
216 syn match rubyPredefinedVariable "$\%(deferr\|defout\)\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
217 syn match rubyPredefinedVariable "$KCODE\>" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
218 " Deprecated/removed in 2.4 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
219 syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(FALSE\|NIL\|TRUE\)\>\%(\s*(\)\@!" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
220 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
221 syn cluster rubyGlobalVariable contains=rubyGlobalVariable,rubyPredefinedVariable,rubyGlobalVariableError |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
222 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
223 " Normal Regular Expressions {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
224 SynFold '/' syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
225 SynFold '/' syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\s\+\)\@<=/\%(=\|\_s\)\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
226 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
227 " Generalized Regular Expressions {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
228 SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
229 SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
230 SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
231 SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
232 SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
233 SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r\z(\s\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
234 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
235 " Characters {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
236 syn match rubyCharacter "\%(\w\|[^\x00-\x7F]\|[]})\"'/]\)\@1<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\[[:space:]]\|\\\=[^[:space:]]\)\)" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
237 syn match rubyCharacter "\%(\w\|[^\x00-\x7F]\|[]})\"'/]\)\@1<!?\\u\%(\x\{4}\|{\x\{1,6}}\)" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
238 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
239 " Normal Strings {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
240 let s:spell_cluster = exists('ruby_spellcheck_strings') ? ',@Spell' : '' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
241 let s:fold_arg = s:foldable('string') ? ' fold' : '' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
242 exe 'syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial' . s:spell_cluster . s:fold_arg |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
243 exe 'syn region rubyString matchgroup=rubyStringDelimiter start="''" end="''" skip="\\\\\|\\''" contains=rubyQuoteEscape,rubyBackslashEscape' . s:spell_cluster . s:fold_arg |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
244 unlet s:spell_cluster s:fold_arg |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
245 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
246 " Shell Command Output {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
247 SynFold 'string' syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
248 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
249 " Generalized Single Quoted Strings, Symbols, Array of Strings and Array of Symbols {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
250 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
251 " Non-bracket punctuation delimiters {{{2 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
252 let s:names = { '~': 'Tilde', '`': 'BackQuote', '!': 'Bang', '@': 'At', '#': 'Hash', '$': 'Dollar', '%': 'Percent', '^': 'Caret', |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
253 \ '&': 'Ampersand', '*': 'Asterix', '_': 'Underscore', '-': 'Dash', '+': 'Plus', '=': 'Equals', '|': 'Bar', |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
254 \ '\': 'Backslash', ':': 'Colon', ';': 'Semicolon', '"': 'DoubleQuote', "'": 'Quote', ',': 'Comma', '.': 'Period', |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
255 \ '?': 'QuestionMark', '/': 'ForwardSlash' } |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
256 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
257 for s:delimiter in keys(s:names) |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
258 let s:group = 'ruby' . s:names[s:delimiter] . 'Escape' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
259 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
260 if s:delimiter =~ '[\"]' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
261 let s:delimiter = '\' . s:delimiter |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
262 endif |
595 | 263 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
264 exe 'syn match ' . s:group . ' "\V\\' . s:delimiter . '" contained display' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
265 exe 'syn cluster rubySingleCharEscape add=' . s:group |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
266 exe 'SynFold ''%'' syn region rubyString matchgroup=rubyPercentStringDelimiter start="\V%q' . s:delimiter . '" end="\V' . s:delimiter . '" skip="\V\\\\\|\\' . s:delimiter . '" contains=rubyBackslashEscape,' . s:group . ' nextgroup=@rubyModifier skipwhite' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
267 exe 'SynFold ''%'' syn region rubyString matchgroup=rubyPercentStringDelimiter start="\V%w' . s:delimiter . '" end="\V' . s:delimiter . '" skip="\V\\\\\|\\' . s:delimiter . '" contains=rubyBackslashEscape,rubySpaceEscape,' . s:group . ' nextgroup=@rubyModifier skipwhite' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
268 exe 'SynFold ''%'' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="\V%s' . s:delimiter . '" end="\V' . s:delimiter . '" skip="\V\\\\\|\\' . s:delimiter . '" contains=rubyBackslashEscape,' . s:group . ' nextgroup=@rubyModifier skipwhite' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
269 exe 'SynFold ''%'' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="\V%i' . s:delimiter . '" end="\V' . s:delimiter . '" skip="\V\\\\\|\\' . s:delimiter . '" contains=rubyBackslashEscape,rubySpaceEscape,' . s:group . ' nextgroup=@rubyModifier skipwhite' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
270 exe 'hi def link ' . s:group . ' rubyStringEscape' |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
271 endfor |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
272 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
273 unlet s:delimiter s:group s:names |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
274 " }}}2 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
275 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
276 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
277 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
278 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketEscape,rubyNestedSquareBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
279 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesisEscape,rubyNestedParentheses |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
280 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=rubyBackslashEscape,rubySpaceEscape |
595 | 281 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
282 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
283 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
284 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketEscape,rubyNestedSquareBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
285 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesisEscape,rubyNestedParentheses |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
286 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
287 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
288 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
289 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketEscape,rubyNestedSquareBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
290 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesisEscape,rubyNestedParentheses |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
291 SynFold '%' syn region rubyString matchgroup=rubyPercentSymbolDelimiter start="%s\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=rubyBackslashEscape,rubySpaceEscape |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
292 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
293 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
294 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
295 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketEscape,rubyNestedSquareBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
296 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesisEscape,rubyNestedParentheses |
595 | 297 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
298 " Generalized Double Quoted Strings, Array of Strings, Array of Symbols and Shell Command Output {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
299 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="\%(\%(\w\|[^\x00-\x7F]\|]\)\s*\)\@<!%=" end="=" skip="\\\\\|\\=" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
300 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
301 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
302 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
303 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
304 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
305 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
306 SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[Qx]\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
307 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
308 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
309 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
310 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
311 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
312 SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
313 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
314 " Here Documents {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
315 syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
316 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
317 syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
318 syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
319 syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop |
595 | 320 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
321 SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
322 SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
323 SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart keepend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
324 SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
325 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
326 SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyHeredocDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
327 SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyHeredocDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
328 SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyHeredocDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart keepend |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
329 SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyHeredocDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
330 |
595 | 331 " Module, Class, Method and Alias Declarations {{{1 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
332 syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable nextgroup=rubyAliasDeclaration2 skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
333 syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
334 syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
335 syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite skipnl |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
336 syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyModuleName,rubyScopeOperator |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
337 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
338 syn match rubyMethodName "\<\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%([[:alnum:]_.:?!=]\|[^\x00-\x7F]\)\@!" contained containedin=rubyMethodDeclaration |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
339 syn match rubyMethodName "\%(\s\|^\)\@1<=\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
340 syn match rubyMethodName "\%([[:space:].]\|^\)\@1<=\%(\[\]=\=\|\*\*\|[-+!~]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
341 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
342 syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyMethodName |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
343 |
595 | 344 " Keywords {{{1 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
345 " TODO: reorganise |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
346 syn match rubyControl "\%#=1\<\%(break\|in\|next\|redo\|retry\|return\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
347 syn match rubyKeyword "\%#=1\<\%(super\|yield\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
348 syn match rubyBoolean "\%#=1\<\%(true\|false\)\>[?!]\@!" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
349 syn match rubyPseudoVariable "\%#=1\<\(self\|nil\)\>[?!]\@!" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
350 syn match rubyPseudoVariable "\%#=1\<__\%(ENCODING\|dir\|FILE\|LINE\|callee\|method\)__\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
351 syn match rubyBeginEnd "\%#=1\<\%(BEGIN\|END\)\>" |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
352 |
595 | 353 " Expensive Mode {{{1 |
354 " Match 'end' with the appropriate opening keyword for syntax based folding | |
355 " and special highlighting of module/class/method definitions | |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
356 if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
357 syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
358 syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
359 syn match rubyDefine "\<undef\>" nextgroup=rubyMethodName skipwhite skipnl |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
360 syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration,rubyEigenClassOperator skipwhite skipnl |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
361 syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl |
595 | 362 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
363 SynFold 'def' syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine skip="\<end:\|\%(\<def\_s\+\)\@<=end\>" end="\<end\>" contains=ALLBUT,@rubyNotTop |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
364 SynFold 'class' syn region rubyClassBlock start="\<class\>" matchgroup=rubyClass skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
365 SynFold 'module' syn region rubyModuleBlock start="\<module\>" matchgroup=rubyModule skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
366 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
367 " modifiers |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
368 syn match rubyLineContinuation "\\$" nextgroup=@rubyModifier skipwhite skipnl |
595 | 369 syn match rubyConditionalModifier "\<\%(if\|unless\)\>" |
370 syn match rubyRepeatModifier "\<\%(while\|until\)\>" | |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
371 syn match rubyRescueModifier "\<rescue\>" |
595 | 372 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
373 syn cluster rubyModifier contains=rubyConditionalModifier,rubyRepeatModifier,rubyRescueModifier |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
374 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
375 SynFold 'do' syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
376 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
377 " curly bracket block or hash literal |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
378 SynFold '{' syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
379 SynFold '[' syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<!\[" end="]" contains=ALLBUT,@rubyNotTop |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
380 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
381 " statements without 'do' |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
382 SynFold 'begin' syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
383 SynFold 'case' syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop |
595 | 384 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
385 SynFold 'if' syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\<then\s\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop |
595 | 386 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
387 syn match rubyConditional "\<\%(then\|else\|when\)\>" contained containedin=rubyCaseExpression |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
388 syn match rubyConditional "\<\%(then\|else\|elsif\)\>" contained containedin=rubyConditionalExpression |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
389 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
390 syn match rubyExceptionHandler "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>" contained containedin=rubyBlockExpression,rubyDoBlock |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
391 syn match rubyExceptionHandler2 "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>" contained containedin=rubyModuleBlock,rubyClassBlock,rubyMethodBlock |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
392 syn cluster rubyExceptionHandler contains=rubyExceptionHandler,rubyExceptionHandler2 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
393 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
394 " statements with optional 'do' |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
395 syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\<do\>" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop |
595 | 396 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
397 SynFold 'for' syn region rubyRepeatExpression start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
398 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
399 if !exists("ruby_minlines") |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
400 let ruby_minlines = 500 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
401 endif |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
402 exe "syn sync minlines=" . ruby_minlines |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
403 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
404 else |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
405 syn match rubyControl "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
406 syn match rubyControl "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
407 syn match rubyControl "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
408 syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|rescue\|ensure\|then\|when\|end\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
409 syn match rubyKeyword "\<\%(alias\|undef\)\>" |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
410 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
411 |
595 | 412 " Special Methods {{{1 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
413 if !exists("ruby_no_special_methods") |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
414 syn match rubyAccess "\<\%(public\|protected\|private\)\>" " use re=2 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
415 syn match rubyAccess "\%#=1\<\%(public\|private\)_class_method\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
416 syn match rubyAccess "\%#=1\<\%(public\|private\)_constant\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
417 syn match rubyAccess "\%#=1\<module_function\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
418 syn match rubyAttribute "\%#=1\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" " attr is a common variable name |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
419 syn match rubyAttribute "\%#=1\<attr_\%(accessor\|reader\|writer\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
420 syn match rubyControl "\%#=1\<\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
421 syn match rubyEval "\%#=1\<eval\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
422 syn match rubyEval "\%#=1\<\%(class\|instance\|module\)_eval\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
423 syn match rubyException "\%#=1\<\%(raise\|fail\|catch\|throw\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
424 syn match rubyInclude "\%#=1\<\%(autoload\|gem\|load\|require\%(_relative\)\=\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
425 syn match rubyKeyword "\%#=1\<\%(callcc\|caller\|lambda\|proc\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
426 syn match rubyMacro "\%#=1\<\%(extend\|include\|prepend\|refine\|using\)\>" |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
427 syn match rubyMacro "\%#=1\<\%(alias\|define\|define_singleton\|remove\|undef\)_method\>" |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
428 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
429 |
595 | 430 " Comments and Documentation {{{1 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
431 syn match rubySharpBang "\%^#!.*" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
432 syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
433 syn match rubyEncoding "[[:alnum:]-]\+" contained display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
434 syn match rubyMagicComment "\c\%<3l#\s*\zs\%(coding\|encoding\):" contained nextgroup=rubyEncoding skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
435 syn match rubyMagicComment "\c\%<10l#\s*\zs\%(frozen_string_literal\|warn_indent\|warn_past_scope\):" contained nextgroup=rubyBoolean skipwhite |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
436 syn match rubyComment "#.*" contains=@rubyCommentSpecial,rubySpaceError,@Spell |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
437 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
438 syn cluster rubyCommentSpecial contains=rubySharpBang,rubyTodo,rubyMagicComment |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
439 syn cluster rubyCommentNotTop contains=@rubyCommentSpecial,rubyEncoding |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
440 |
595 | 441 if !exists("ruby_no_comment_fold") && s:foldable('#') |
442 syn region rubyMultilineComment start="^\s*#.*\n\%(^\s*#\)\@=" end="^\s*#.*\n\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend | |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
443 syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\%(\s.*\)\=$" contains=rubySpaceError,rubyTodo,@Spell fold |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
444 else |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
445 syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
446 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
447 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
448 " {{{1 Useless Line Continuations |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
449 syn match rubyUselessLineContinuation "\%([.:,;{([<>~\*%&^|+=-]\|%(\%(\w\|[^\x00-\x7F]\)\@1<![?!]\)\s*\zs\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
450 syn match rubyUselessLineContinuation "\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty contained |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
451 |
595 | 452 " Keyword Nobbling {{{1 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
453 " prevent methods with keyword names being highlighted as keywords when called |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
454 syn match rubyKeywordAsMethod "\%(\%(\.\@1<!\.\)\|&\.\|::\)\_s*\%([_[:lower:]][_[:alnum:]]*\|\%(BEGIN\|END\)\>\)" transparent contains=rubyDotOperator,rubyScopeOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
455 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
456 " Bang and Predicate Methods and Operators {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
457 syn match rubyBangPredicateMethod "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]" |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
458 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
459 if !exists("ruby_no_special_methods") |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
460 syn match rubyControl "\%#=1\<exit!" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
461 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
462 syn match rubyDefinedOperator "\%#=1\<defined?" display |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
463 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
464 " 1.9-style Hash Keys and Keyword Parameters {{{1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
465 syn match rubySymbol "\%([{(|,]\_s*\)\@<=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
466 syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="he=e-1 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
467 syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
468 |
595 | 469 " __END__ Directive {{{1 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
470 SynFold '__END__' syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
471 |
595 | 472 " Default Highlighting {{{1 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
473 hi def link rubyClass rubyDefine |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
474 hi def link rubyModule rubyDefine |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
475 hi def link rubyExceptionHandler2 rubyDefine |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
476 hi def link rubyDefine Define |
623 | 477 hi def link rubyAccess rubyMacro |
478 hi def link rubyAttribute rubyMacro | |
479 hi def link rubyMacro Macro | |
480 hi def link rubyMethodName rubyFunction | |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
481 hi def link rubyFunction Function |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
482 hi def link rubyConditional Conditional |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
483 hi def link rubyConditionalModifier rubyConditional |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
484 hi def link rubyExceptionHandler rubyConditional |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
485 hi def link rubyRescueModifier rubyExceptionHandler |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
486 hi def link rubyRepeat Repeat |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
487 hi def link rubyRepeatModifier rubyRepeat |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
488 hi def link rubyOptionalDo rubyRepeat |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
489 hi def link rubyControl Statement |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
490 hi def link rubyInclude Include |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
491 hi def link rubyInteger Number |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
492 hi def link rubyCharacter Character |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
493 hi def link rubyFloat Float |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
494 hi def link rubyBoolean Boolean |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
495 hi def link rubyException Exception |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
496 if !exists("ruby_no_identifiers") |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
497 hi def link rubyIdentifier Identifier |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
498 else |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
499 hi def link rubyIdentifier NONE |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
500 endif |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
501 hi def link rubyClassVariable rubyIdentifier |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
502 hi def link rubyConstant Type |
623 | 503 hi def link rubyClassName rubyConstant |
504 hi def link rubyModuleName rubyConstant | |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
505 hi def link rubyGlobalVariable rubyIdentifier |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
506 hi def link rubyInstanceVariable rubyIdentifier |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
507 hi def link rubyPredefinedIdentifier rubyIdentifier |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
508 hi def link rubyPredefinedConstant rubyPredefinedIdentifier |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
509 hi def link rubyPredefinedVariable rubyPredefinedIdentifier |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
510 hi def link rubySymbol Constant |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
511 hi def link rubyKeyword Keyword |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
512 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
513 hi def link rubyOperator Operator |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
514 hi def link rubyDefinedOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
515 hi def link rubyEnglishBooleanOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
516 if exists("ruby_operators") |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
517 hi def link rubyTernaryOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
518 hi def link rubyArithmeticOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
519 hi def link rubyComparisonOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
520 hi def link rubyBitwiseOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
521 hi def link rubyBooleanOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
522 hi def link rubyRangeOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
523 hi def link rubyAssignmentOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
524 hi def link rubyEqualityOperator rubyOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
525 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
526 |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
527 if exists("ruby_pseudo_operators") |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
528 hi def link rubyPseudoOperator Special |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
529 hi def link rubyDotOperator rubyPseudoOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
530 hi def link rubyScopeOperator rubyPseudoOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
531 hi def link rubySuperClassOperator rubyPseudoOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
532 hi def link rubyEigenClassOperator rubyPseudoOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
533 hi def link rubyLambdaOperator rubyPseudoOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
534 hi def link rubyDoubleSplatOperator rubyPseudoOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
535 hi def link rubySplatOperator rubyPseudoOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
536 hi def link rubyProcOperator rubyPseudoOperator |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
537 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
538 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
539 hi def link rubyBeginEnd Statement |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
540 hi def link rubyEval Statement |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
541 hi def link rubyPseudoVariable Constant |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
542 hi def link rubyCapitalizedMethod NONE |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
543 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
544 hi def link rubyComment Comment |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
545 hi def link rubyEncoding Constant |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
546 hi def link rubyMagicComment SpecialComment |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
547 hi def link rubyData Comment |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
548 hi def link rubyDataDirective Delimiter |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
549 hi def link rubyDocumentation Comment |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
550 hi def link rubyTodo Todo |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
551 |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
552 hi def link rubyBackslashEscape rubyStringEscape |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
553 hi def link rubyQuoteEscape rubyStringEscape |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
554 hi def link rubySpaceEscape rubyStringEscape |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
555 hi def link rubyParenthesisEscape rubyStringEscape |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
556 hi def link rubyCurlyBraceEscape rubyStringEscape |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
557 hi def link rubyAngleBracketEscape rubyStringEscape |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
558 hi def link rubySquareBracketEscape rubyStringEscape |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
559 hi def link rubyStringEscape Special |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
560 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
561 hi def link rubyInterpolationDelimiter Delimiter |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
562 hi def link rubySharpBang PreProc |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
563 hi def link rubyStringDelimiter Delimiter |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
564 hi def link rubyHeredocDelimiter rubyStringDelimiter |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
565 hi def link rubyPercentRegexpDelimiter rubyRegexpDelimiter |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
566 hi def link rubyPercentStringDelimiter rubyStringDelimiter |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
567 hi def link rubyPercentSymbolDelimiter rubySymbolDelimiter |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
568 hi def link rubyRegexpDelimiter rubyStringDelimiter |
595 | 569 hi def link rubySymbolDelimiter rubySymbol |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
570 hi def link rubyString String |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
571 hi def link rubyRegexpEscape rubyRegexpSpecial |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
572 hi def link rubyRegexpQuantifier rubyRegexpSpecial |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
573 hi def link rubyRegexpAnchor rubyRegexpSpecial |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
574 hi def link rubyRegexpDot rubyRegexpCharClass |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
575 hi def link rubyRegexpCharClass rubyRegexpSpecial |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
576 hi def link rubyRegexpIntersection rubyRegexpSpecial |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
577 hi def link rubyRegexpSpecial Special |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
578 hi def link rubyRegexpComment Comment |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
579 hi def link rubyRegexp rubyString |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
580 |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
581 hi def link rubyError Error |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
582 if exists("ruby_line_continuation_error") |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
583 hi def link rubyUselessLineContinuation rubyError |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
584 endif |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
585 hi def link rubyGlobalVariableError rubyError |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
586 hi def link rubySpaceError rubyError |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
587 |
595 | 588 " Postscript {{{1 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
589 let b:current_syntax = "ruby" |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
590 |
595 | 591 let &cpo = s:cpo_sav |
592 unlet! s:cpo_sav | |
593 | |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
594 delc SynFold |
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
623
diff
changeset
|
595 |
595 | 596 " vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: |