PATCH: simplified rubyData pattern

Doug Kearns djkea2 at
Fri Oct 3 21:53:40 EDT 2003

I thought I might as well make use of the nifty 'end of file' atom since
the equally nifty 'start of file' atom is used for rubySharpBang. Now
where can we use the new \%# atom?

Index: syntax/ruby.vim
RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v
retrieving revision 1.31
diff -u -b -r1.31 ruby.vim
--- syntax/ruby.vim	3 Oct 2003 10:22:54 -0000	1.31
+++ syntax/ruby.vim	3 Oct 2003 10:37:46 -0000
@@ -156,7 +156,7 @@
 " Keywords
 " Note: the following keywords have already been defined:
-" begin case class def do end for if module unless until while __FILE_ __LINE__
+" begin case class def do end for if module unless until while
 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
@@ -195,7 +195,7 @@
 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|raise\|throw\|trap\)\>"			transparent contains=NONE
 " __END__ Directive
-syn region rubyData matchgroup=rubyDataDirective start="^__END__$" matchgroup=NONE end="." skip="." fold
+syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already

More information about the vim-ruby-devel mailing list