PATCH: allow strings inside interpolation
Doug Kearns
dougkearns at gmail.com
Fri Jul 22 10:34:58 EDT 2005
This is the beginning of an update to the interpolation syntax
highlighting - allowing strings to appear within these regions.
Regards,
Doug
Index: syntax/ruby.vim
===================================================================
RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v
retrieving revision 1.45
diff -u -r1.45 ruby.vim
--- syntax/ruby.vim 5 Apr 2005 07:21:39 -0000 1.45
+++ syntax/ruby.vim 22 Jul 2005 13:05:37 -0000
@@ -40,7 +40,7 @@
" Expression Substitution and Backslash Notation
syn match rubyEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
syn match rubyEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
-syn match rubyInterpolation "#{[^}]*}" contained
+syn match rubyInterpolation "#{[^}]*}" contained contains=rubyString
syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" contained display
syn match rubyNoInterpolation "\\#{[^}]*}" contained
syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" contained display
More information about the vim-ruby-devel
mailing list