[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Bug?: vim folding for Ruby

Kaspar Schiess

11/15/2004 12:27:00 PM

Hello all, Hello Doug,

I am still fighting against ruby support in VIM, here's my problem:
+ def foo
|+ def bar
||+ [1,2,3].each do
||| puts
||| end
|| end
| end

folds correctly, while

+ def foo
| [1,2,3].each do
|+ puts
|| end
| end

does not (simulated fold margin=3).

I have traced the trouble back two the following problem solving hints:
- disabling matchgroup directives in the syntax regions that are
occupied with 'do' folding disables the nice highlight, but gets
the folds right.

- The number of enclosing regions makes all the difference: This is
illustrated above. The 'def foo; def bar' sequence is not everyday
Ruby, I know, but try it with any enclosing, fold producing sequence
like class A; class B or the like.

I would welcome any hints at all, since this really begins to annoy me.
Thank you !
kaspar

hand manufactured code - www.tua.ch/ruby



1 Answer

Doug Kearns

11/15/2004 1:14:00 PM

0

Hello Kaspar,

On Mon, Nov 15, 2004 at 09:26:40PM +0900, Kaspar Schiess wrote:
> Hello all, Hello Doug,
>
> I am still fighting against ruby support in VIM, here's my problem:

<snip>

> folds correctly, while
>
> + def foo
> | [1,2,3].each do
> |+ puts
> || end
> | end
>
> does not (simulated fold margin=3).

Again, this works for me, unfortunately...

<snip>

> I would welcome any hints at all, since this really begins to annoy me.
> Thank you !

Since this will probably require a little 'back and forth' would you
mind if we moved it to the vim-ruby mailing list?

http://rubyforge.org/mail/?g...

Thanks,
Doug