PATCH: splitting the rubyInteger syntax group

Doug Kearns djkea2 at mugca.its.monash.edu.au
Fri Sep 19 02:08:25 EDT 2003


I've split the rubyInteger syntax group into multiple groups -
rubyASCIICode, rubyHexadecimal, rubyDecimal, rubyOctal, and rubyBinary 

This ten minutes a day development model is interesting...

Regards,
Doug

Index: syntax/ruby.vim
===================================================================
RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v
retrieving revision 1.23
diff -u -r1.23 ruby.vim
--- syntax/ruby.vim	18 Sep 2003 15:10:14 -0000	1.23
+++ syntax/ruby.vim	18 Sep 2003 15:12:17 -0000
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:	Ruby
 " Maintainer:	Doug Kearns <djkea2 at mugca.its.monash.edu.au>
-" Info:		$Id: ruby.vim,v 1.23 2003/09/18 15:10:14 dkearns Exp $
+" Info:		$Id: ruby.vim,v 1.22 2003/09/18 00:27:15 dkearns Exp $
 " URL:		http://vim-ruby.sourceforge.net
 " Anon CVS:	See above site
 " Licence:	GPL (http://www.gnu.org)
@@ -30,10 +30,13 @@
 syn match rubyExprSubst "#\%(\$\|@@\=\)\w\+"									contained display
 
 " Numbers and ASCII Codes
-syn match rubyInteger "\w\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{3}\|\\x\x\{2}\|\\\=\S\)\)"
-syn match rubyInteger "\<\%(0x\x\+\%(_\x\+\)*\|0b[01]\+\%(_[01]\+\)*\|0\o\+\%(_\o\+\)*\|[1-9]\+\%(_\d\+\)*\)\>"	display
-syn match rubyFloat   "\<\d\+\%(_\d\+\)*\.\d\+\%(_\d\+\)*\>"							display
-syn match rubyFloat   "\<\%(\d\+\%(_\d\+\)*\%(\.\d\+\%(_\d\+\)*\)\=\)\%([eE][-+]\=\%(\d\+\%(_\d\+\)*\)\+\)\>"	display
+syn match rubyASCIICode   "\w\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{3}\|\\x\x\{2}\|\\\=\S\)\)"
+syn match rubyHexadecimal "\<0x\x\+\%(_\x\+\)*\>"									display
+syn match rubyDecimal     "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\>"								display
+syn match rubyOctal       "\<0\o\+\%(_\o\+\)*\>"									display
+syn match rubyBinary      "\<0b[01]\+\%(_[01]\+\)*\>"									display
+syn match rubyFloat       "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>"						display
+syn match rubyFloat       "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>"	display
 
 " Identifiers
 syn match rubyLocalVariableOrMethod "[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent
@@ -202,6 +205,11 @@
   HiLink rubyControl			Statement
   HiLink rubyInclude			Include
   HiLink rubyInteger			Number
+  HiLink rubyASCIICode			rubyInteger
+  HiLink rubyBinary			rubyInteger
+  HiLink rubyOctal			rubyInteger
+  HiLink rubyHexadecimal		rubyInteger
+  HiLink rubyDecimal			rubyInteger
   HiLink rubyFloat			Float
   HiLink rubyBoolean			Boolean
   HiLink rubyException			Exception


More information about the vim-ruby-devel mailing list