PATCH: improve highlighting of conditional expressions

Doug Kearns dougkearns at gmail.com
Thu Jul 28 02:10:22 EDT 2005


This improves the matching of conditional expressions.
  
Regards,
Doug


Index: syntax/ruby.vim
===================================================================
RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v
retrieving revision 1.47
diff -u -r1.47 ruby.vim
--- syntax/ruby.vim	26 Jul 2005 10:48:10 -0000	1.47
+++ syntax/ruby.vim	28 Jul 2005 05:53:26 -0000
@@ -157,7 +157,7 @@
   syn region rubyCurlyBlock start="{" end="}" contains=ALLBUT, at rubyExtendedStringSpecial,rubyTodo fold
 
   " statements without *do*
-  syn region rubyNoDoBlock matchgroup=rubyControl start="\<\%(case\|begin\)\>" start="^\s*\%(if\|unless\)\>" start="[;=(]\s*\%(if\|unless\)\>"hs=s+1 end="\<end\>" contains=ALLBUT, at rubyExtendedStringSpecial,rubyTodo fold
+  syn region rubyNoDoBlock matchgroup=rubyControl start="\<\%(case\|begin\)\>" start="\%(^\|\.\.\.\=\|[;=([<>~+-\*/]\)\s*\zs\%(if\|unless\)\>" end="\<end\>" contains=ALLBUT, at rubyExtendedStringSpecial,rubyTodo fold
 
   " statement with optional *do*
   syn region rubyOptDoBlock matchgroup=rubyControl start="\<for\>" start="^\s*\%(while\|until\)\>" start=";\s*\%(while\|until\)\>"hs=s+1 end="\<end\>" contains=ALLBUT, at rubyExtendedStringSpecial,rubyTodo fold


More information about the vim-ruby-devel mailing list