diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-10-24 13:15:38 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-10-24 13:15:38 +0200 |
commit | a39c9013ccca8ec0c12d849d12cbf1890df61062 (patch) | |
tree | dbc1a2544c475ee8a9b9404bb83563ae95bb0900 /syntax/ruby.vim | |
parent | 25d2786cae095350d504d326346e3df6620ca9bf (diff) | |
download | vim-polyglot-a39c9013ccca8ec0c12d849d12cbf1890df61062.tar.gz vim-polyglot-a39c9013ccca8ec0c12d849d12cbf1890df61062.zip |
Update ruby syntaxv2.2.4
Diffstat (limited to 'syntax/ruby.vim')
-rw-r--r-- | syntax/ruby.vim | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/syntax/ruby.vim b/syntax/ruby.vim index 239a2cd0..79d2e1b5 100644 --- a/syntax/ruby.vim +++ b/syntax/ruby.vim @@ -82,7 +82,7 @@ syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedPare syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment " Numbers and ASCII Codes -syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" +syn match rubyASCIICode "\%(\w\|[]})\"'/\.]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display @@ -131,14 +131,12 @@ syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomx syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold -" Normal String and Shell Command Output -if exists('ruby_spellcheck_strings') - syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold - syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold -else - syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold - syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold -endif +" Normal String +let s:spell_cluster = exists('ruby_spellcheck_strings') ? ',@Spell' : '' +exe 'syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" fold contains=@rubyStringSpecial' . s:spell_cluster +exe 'syn region rubyString matchgroup=rubyStringDelimiter start="''" end="''" skip="\\\\\|\\''" fold contains=rubyQuoteEscape' . s:spell_cluster + +" Shell Command Output syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold " Generalized Single Quoted String, Symbol and Array of Strings |