Forum: Ruby ruby/vim folding question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 ara.t.howard (Guest)
on 2005-11-22 02:36
(Received via mailing list)
any ruby/vim gurus out there know how to fold only these:

   modules
   classes
   methods

based on syntax method folding?

fold level won't cut it here since i might have

   module A
     module B
       module C
         module D
           class C
             def method
             end
           end
         end
       end
     end
   end

??

-a
8ecb8bb62c3283f8069a54056c7dc25f?d=identicon&s=25 jim (Guest)
on 2005-11-22 08:46
(Received via mailing list)
On 11/21/05, Ara.T.Howard <ara.t.howard@noaa.gov> wrote:
>
> any ruby/vim gurus out there know how to fold only these:
>
>    modules
>    classes
>    methods
>
> based on syntax method folding?
>
> fold level won't cut it here since i might have

Not sure I understand the problem.
Folding works for me. I have

set foldmethod=syntax
set foldnestmax=5     " usually 3, but more for this case
Bfcc9047bea80035a936648dc1912ec4?d=identicon&s=25 gsinclair (Guest)
on 2005-11-22 08:50
(Received via mailing list)
Ara.T.Howard wrote:
> any ruby/vim gurus out there know how to fold only these:
>
>    modules
>    classes
>    methods
>
> based on syntax method folding?

No, I don't know.

>          end
>        end
>      end
>    end

Good question, though!

Gavin
Dd76a12d66f843de5c5f8782668e7127?d=identicon&s=25 mfp (Guest)
on 2005-11-22 09:59
(Received via mailing list)
On Tue, Nov 22, 2005 at 10:33:23AM +0900, Ara.T.Howard wrote:
> any ruby/vim gurus out there know how to fold only these:
>
>   modules
>   classes
>   methods

This is exactly the problem I tried to solve in
  http://eigenclass.org/hiki.rb?Usable+Ruby+folding+for+Vim

HTH
Dd76a12d66f843de5c5f8782668e7127?d=identicon&s=25 mfp (Guest)
on 2005-11-22 15:57
(Received via mailing list)
On Tue, Nov 22, 2005 at 05:55:51PM +0900, Mauricio Fernández wrote:
> On Tue, Nov 22, 2005 at 10:33:23AM +0900, Ara.T.Howard wrote:
> > any ruby/vim gurus out there know how to fold only these:
> >
> >   modules
> >   classes
> >   methods
>
> This is exactly the problem I tried to solve in
>   http://eigenclass.org/hiki.rb?Usable+Ruby+folding+for+Vim

eigenclass.org has been down for ~4H this morning but it's back up, in
case
you still want to take a look.
Bfcc9047bea80035a936648dc1912ec4?d=identicon&s=25 gsinclair (Guest)
on 2005-11-22 16:09
(Received via mailing list)
Mauricio Fernández wrote:
>
> eigenclass.org has been down for ~4H this morning but it's back up, in case
> you still want to take a look.

Gee, that looks awesome!  Might be enough to get me to use folding...

Gavin
This topic is locked and can not be replied to.