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