PATCH: added support for new octal and decimal base indicators

Doug Kearns djkea2 at mugca.its.monash.edu.au
Thu Nov 6 21:28:13 EST 2003


This adds support for the new octal and decimal base indicators, and for
capitalization of all base indicators.

Regards,
Doug

Index: syntax/ruby.vim
===================================================================
RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v
retrieving revision 1.34
diff -u -r1.34 ruby.vim
--- syntax/ruby.vim	14 Oct 2003 10:36:10 -0000	1.34
+++ syntax/ruby.vim	6 Nov 2003 08:46:12 -0000
@@ -36,10 +36,10 @@
 
 " Numbers and ASCII Codes
 syn match rubyASCIICode	"\w\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
-syn match rubyInteger	"\<0x\x\+\%(_\x\+\)*\>"									display
-syn match rubyInteger	"\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\>"							display
-syn match rubyInteger	"\<0\o\+\%(_\o\+\)*\>"									display
-syn match rubyInteger	"\<0b[01]\+\%(_[01]\+\)*\>"								display
+syn match rubyInteger	"\<0[xX]\x\+\%(_\x\+\)*\>"								display
+syn match rubyInteger	"\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>"						display
+syn match rubyInteger	"\<0[oO]\=\o\+\%(_\o\+\)*\>"								display
+syn match rubyInteger	"\<0[bB][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
 


More information about the vim-ruby-devel mailing list