PATCH: new rubyPseudoVariable syntax group

Doug Kearns djkea2 at mugca.its.monash.edu.au
Wed Oct 1 00:00:16 EDT 2003


I've created a new rubyPseudoVariable syntax group which includes self,
nil, __FILE__ and __LINE__. rubyBoolean is now linked to rubyPseudoVariable.

For some reason self and nil have always been part of the rubyBoolean
group - weird, eh?

Regards,
Doug

Index: syntax/ruby.vim
===================================================================
RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v
retrieving revision 1.29
diff -u -b -r1.29 ruby.vim
--- syntax/ruby.vim	25 Sep 2003 14:42:26 -0000	1.29
+++ syntax/ruby.vim	30 Sep 2003 13:08:44 -0000
@@ -61,7 +61,6 @@
   syn match rubyPredefinedVariable "$-[0FIKadilpvw]"									display
   syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>"					display
   syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOAD_PATH\|SAFE\|VERBOSE\)\>"				display
-  syn match rubyPredefinedConstant "__\%(FILE\|LINE\)__\>"								display
   syn match rubyPredefinedConstant "\<\%(::\)\=\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>"					display
   syn match rubyPredefinedConstant "\<\%(::\)\=\zs\%(DATA\|FALSE\|NIL\|RUBY_PLATFORM\|RUBY_RELEASE_DATE\)\>"		display
   syn match rubyPredefinedConstant "\<\%(::\)\=\zs\%(RUBY_VERSION\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>"	display
@@ -161,7 +160,8 @@
 syn keyword rubyControl  and break else elsif ensure in next not or redo rescue retry return then when
 syn match   rubyOperator "\<defined?" display
 syn keyword rubyKeyword  alias super undef yield
-syn keyword rubyBoolean  true false self nil
+syn keyword rubyBoolean		true false
+syn keyword rubyPseudoVariable	nil self __FILE__ __LINE__
 syn keyword rubyBeginEnd BEGIN END
 
 " Special Methods


More information about the vim-ruby-devel mailing list