PATCH: support for %s() symbol literals

Doug Kearns djkea2 at mugca.its.monash.edu.au
Tue Sep 9 01:12:23 EDT 2003


This adds preliminary support for the new %s() style symbol literals.

Regards,
Doug

Index: syntax/ruby.vim
===================================================================
RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v
retrieving revision 1.14
diff -u -r1.14 ruby.vim
--- syntax/ruby.vim	2 Sep 2003 09:45:08 -0000	1.14
+++ syntax/ruby.vim	8 Sep 2003 14:13:56 -0000
@@ -88,33 +88,33 @@
 syn region rubyString matchgroup=rubyStringDelimit start="%r\[" end="\][iomx]*" skip="\\\\\|\\\]" contains=rubyExprSubst fold
 syn region rubyString matchgroup=rubyStringDelimit start="%r("  end=")[iomx]*"  skip="\\\\\|\\)"  contains=rubyExprSubst fold
 
-" Generalized Single Quoted String and Array of Strings
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]!"  end="!"  skip="\\\\\|\\!"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\"" end="\"" skip="\\\\\|\\\""	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]#"  end="#"  skip="\\\\\|\\#"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\$" end="\$" skip="\\\\\|\\\$"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]%"  end="%"  skip="\\\\\|\\%"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]&"  end="&"  skip="\\\\\|\\&"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]'"  end="'"  skip="\\\\\|\\'"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\*" end="\*" skip="\\\\\|\\\*"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]+"  end="+"  skip="\\\\\|\\+"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]-"  end="-"  skip="\\\\\|\\-"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\." end="\." skip="\\\\\|\\\."	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]/"  end="/"  skip="\\\\\|\\/"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]:"  end=":"  skip="\\\\\|\\:"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq];"  end=";"  skip="\\\\\|\\;"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]="  end="="  skip="\\\\\|\\="	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]?"  end="?"  skip="\\\\\|\\?"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]@"  end="@"  skip="\\\\\|\\@"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\\" end="\\"			fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\^" end="\^" skip="\\\\\|\\\^"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]`"  end="`"  skip="\\\\\|\\`"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]|"  end="|"  skip="\\\\\|\\|"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\~" end="\~" skip="\\\\\|\\\~"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]{"  end="}"  skip="\\\\\|\\}"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]<"  end=">"  skip="\\\\\|\\>"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\[" end="\]" skip="\\\\\|\\\]"	fold
-syn region rubyString matchgroup=rubyStringDelimit start="%[wq]("  end=")"  skip="\\\\\|\\)"	fold
+" Generalized Single Quoted String, Symbol and Array of Strings
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]!"  end="!"  skip="\\\\\|\\!"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]\"" end="\"" skip="\\\\\|\\\""	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]#"  end="#"  skip="\\\\\|\\#"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]\$" end="\$" skip="\\\\\|\\\$"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]%"  end="%"  skip="\\\\\|\\%"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]&"  end="&"  skip="\\\\\|\\&"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]'"  end="'"  skip="\\\\\|\\'"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]\*" end="\*" skip="\\\\\|\\\*"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]+"  end="+"  skip="\\\\\|\\+"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]-"  end="-"  skip="\\\\\|\\-"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]\." end="\." skip="\\\\\|\\\."	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]/"  end="/"  skip="\\\\\|\\/"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]:"  end=":"  skip="\\\\\|\\:"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw];"  end=";"  skip="\\\\\|\\;"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]="  end="="  skip="\\\\\|\\="	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]?"  end="?"  skip="\\\\\|\\?"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]@"  end="@"  skip="\\\\\|\\@"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]\\" end="\\"			fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]\^" end="\^" skip="\\\\\|\\\^"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]`"  end="`"  skip="\\\\\|\\`"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]|"  end="|"  skip="\\\\\|\\|"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]\~" end="\~" skip="\\\\\|\\\~"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]{"  end="}"  skip="\\\\\|\\}"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]<"  end=">"  skip="\\\\\|\\>"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]\[" end="\]" skip="\\\\\|\\\]"	fold
+syn region rubyString matchgroup=rubyStringDelimit start="%[qsw]("  end=")"  skip="\\\\\|\\)"	fold
 
 " Generalized Double Quoted String and Array of Strings and Shell Command Output
 syn region rubyString matchgroup=rubyStringDelimit start="%[QWx]\=!"  end="!"  skip="\\\\\|\\!"  contains=rubyExprSubst	fold


More information about the vim-ruby-devel mailing list