PATCH: test for folding feature before setting foldmethod

Doug Kearns djkea2 at mugca.its.monash.edu.au
Wed May 12 09:07:33 EDT 2004


This checks for the folding feature rather than just for version 6 when
testing if the foldmethod should be set to syntax because ruby_fold is
set. There's no point in pretending we support version 5.x anymore
anyway.

Regards,
Doug

Index: syntax/ruby.vim
===================================================================
RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v
retrieving revision 1.36
diff -u -r1.36 ruby.vim
--- syntax/ruby.vim	23 Apr 2004 14:11:54 -0000	1.36
+++ syntax/ruby.vim	12 May 2004 13:33:42 -0000
@@ -24,11 +24,7 @@
   finish
 endif
 
-if version < 600 && exists("ruby_fold")
-  unlet ruby_fold
-endif
-
-if exists("ruby_fold")
+if has("folding") && exists("ruby_fold")
   setlocal foldmethod=syntax
 endif
 
@@ -264,4 +260,4 @@
 
 let b:current_syntax = "ruby"
 
-" vim: nowrap tabstop=8 ff=unix
+" vim: nowrap ts=8 ff=unix


More information about the vim-ruby-devel mailing list