PATCH: add highlighting support for access control methods

Doug Kearns djkea2 at
Fri Aug 22 01:27:34 EDT 2003

I've added a new syntax group rubyAccess for the access control methods
and linked it to the Statement group, which seemed the most appropriate.


Index: syntax/ruby.vim
RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v
retrieving revision 1.7
diff -u -r1.7 ruby.vim
--- syntax/ruby.vim	21 Aug 2003 08:09:57 -0000	1.7
+++ syntax/ruby.vim	21 Aug 2003 13:27:19 -0000
@@ -219,11 +219,12 @@
 " Special Methods
 if !exists("ruby_no_special_methods")
-  syn match   rubyInclude   "^\s*include\>"
+  syn match   rubyInclude   "^\s*\(extend\|include\)\>"
   syn keyword rubyInclude   load require
   syn keyword rubyControl   loop
   syn keyword rubyException raise fail catch throw
   syn keyword rubyKeyword   lambda proc
+  syn keyword rubyAccess    public protected private
 " Comments and Documentation
@@ -278,6 +279,7 @@
   HiLink rubySharpBang			PreProc
   HiLink rubyKeyword			Keyword
   HiLink rubyBeginEnd			Statement
+  HiLink rubyAccess			Statement
   HiLink rubyString			String
   HiLink rubyStringDelimit		Delimiter

More information about the vim-ruby-devel mailing list