On Tuesday, November 9, 2004, 12:47:07 PM, Gavin wrote:

> On Tuesday, November 9, 2004, 12:43:34 PM, Ara wrote:

>> On Tue, 9 Nov 2004, Gavin Sinclair wrote:

>>> Isn't there a way to limit the number of folds created by
>>> fm=indent?

>> yes - but you can say do THIS and THAT level.  just a depth

> Maybe the fm=syntax option, then?  I don't know anything about that,
> but it sounds promising.

Follow-up: it's not promising.  Vim's current syntax definition for
Ruby (http://vim-ruby.rubyforge.org) does enable syntax-based folding,
but it can't be selective about what it folds (i.e. classes and
methods only, per Ara's request).

The following settings should be OK:

  set foldmethod=syntax
  set foldnestmax=2        " or 3

If anyone knows enough about Vim to make the folding smarter for Ruby
files, please step forward :)

Gavin