From: Michael Brailsford Date: 2002-04-26T13:02:27+09:00 Subject: Small patch for ruby,vim syntax highlighting file --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I posted this to the vim-dev mailing list and hopefully it will be incorporated in the vim distribution. Until then, for those of us who use vim (I am biting my tongue...arghh...emacs sucks...note to self - bite harder...) apply this patch to $VIMRUNTIME/syntax/ruby.vim. This fixes highlighting errors with class vars, ie. @@a_class_var, and now \w is highlighted properly in Regexp's, ie. /\b\w+\b/. I could not find contact information for the maintainer of ruby.vim, so I had to get the patch out this way. -Michael -- Vim is like Emacs without all the typing. (John "Johann" Spetz) --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ruby.vim.diff" --- ruby.vim Thu Apr 25 21:16:42 2002 +++ /usr/local/share/vim/vim61/syntax/ruby.vim Thu Mar 28 10:54:57 2002 @@ -16,7 +16,7 @@ endif " Expression Substitution: and Backslash Notation -syn match rubyExprSubst "\\\\\|\(\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\w\)\|\(\\\o\{3}\|\\x\x\{2}\|\\[tnrfbaesw]\)" contained +syn match rubyExprSubst "\\\\\|\(\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\w\)\|\(\\\o\{3}\|\\x\x\{2}\|\\[tnrfbaes]\)" contained syn match rubyExprSubst "#{[^}]*}" contained syn match rubyExprSubst "#[$@]\w\+" contained @@ -27,7 +27,7 @@ " Special Identifiers: instance, global, symbol, iterator, predefined if !exists("ruby_no_identifiers") syn match rubyIdentifier "\<\u\w*" - syn match rubyIdentifier "@\{1,2}\h\w*" + syn match rubyIdentifier "@\h\w*" syn match rubyIdentifier "$\h\w*" syn match rubyIdentifier "\s:\h\w*" syn match rubyIdentifier "|[ ,a-zA-Z0-9_*]\+|" --DocE+STaALJfprDB--