summaryrefslogtreecommitdiffstats
path: root/syntax/ruby.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2016-09-11 13:24:17 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2016-09-11 13:24:17 +0200
commit0244e228faf6ee71750cbca3bdcd18411a927d22 (patch)
treea72e5c9839ea593f6edc23f7f0e637e0a4a89413 /syntax/ruby.vim
parentab61d2ac8eafc9c10097577736602da48ec568ca (diff)
downloadvim-polyglot-0244e228faf6ee71750cbca3bdcd18411a927d22.tar.gz
vim-polyglot-0244e228faf6ee71750cbca3bdcd18411a927d22.zip
Update
Diffstat (limited to 'syntax/ruby.vim')
-rw-r--r--syntax/ruby.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/syntax/ruby.vim b/syntax/ruby.vim
index 63ac6b46..ba7d9fe6 100644
--- a/syntax/ruby.vim
+++ b/syntax/ruby.vim
@@ -16,6 +16,10 @@ if exists("b:current_syntax")
finish
endif
+" this file uses line continuations
+let s:cpo_sav = &cpo
+set cpo&vim
+
" Folding Config {{{1
if has("folding") && exists("ruby_fold")
setlocal foldmethod=syntax
@@ -140,7 +144,7 @@ endif
syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)*\s*(\@="
syn match rubyBlockParameter "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contained
-syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter
+syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" oneline display contains=rubyBlockParameter
syn match rubyInvalidVariable "$[^ A-Za-z_-]"
syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]#
@@ -544,6 +548,9 @@ hi def link rubySpaceError rubyError
" Postscript {{{1
let b:current_syntax = "ruby"
+let &cpo = s:cpo_sav
+unlet! s:cpo_sav
+
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:
endif