Paul Robins | 1 Jul 2002 14:36

folding: some questions and comments (long)

(Please forgive me if a second, similar post to the one below appears on 
this list. I lost up my original posting but I'm still not sure if it 
survived somewhere in the posting process).

I'm a brand new vim user, quite excited to find a powerful, supported 
text editor with a good implementation of "folding". I have however, 
several comments and questions related to vims implementation of 
folding. For info, I'm using exclusively foldmethod=marker.

As an ex-Inmos person, where folding was almost a religion I'm a keen 
"folder". The "style" of folding used in some of those long gone editors 
that I used in my youth was (IMHO) elegant and powerful. I'd like to 
make vim look and behave a little more like that, if possible. For 
starters, there are a couple of things I'd like to be able to do. Maybe 
others may also like some of these ideas...

1) Indent folded lines to the same level as the fold's contents:

eg:

if (some test) {
    ... this stuff is folded
    ... so is this

    if (some other test) {
       ... also folded
    }
}

reads much nicer than :
(Continue reading)

Mario Schweigler | 1 Jul 2002 20:55
Picon

Re: folding: some questions and comments (long)

Hi Paul,

I can see, you are an origami guy! ;)

I am currently writing some scripts to improve the look and feel of vim
folding, so that it looks more like origami. (This includes the famous 3
dots! :) )

Also, I am writing scripts to enter and exit folds. And I'm writing
syntax and indent files for occam (maybe you are interested in that as
well).

All that will soon be in beta stage and I will post a link to the
mailing list, so that interested people can test it too.

Mario

Paul Robins wrote:
> 
> (Please forgive me if a second, similar post to the one below appears on
> this list. I lost up my original posting but I'm still not sure if it
> survived somewhere in the posting process).
> 
> I'm a brand new vim user, quite excited to find a powerful, supported
> text editor with a good implementation of "folding". I have however,
> several comments and questions related to vims implementation of
> folding. For info, I'm using exclusively foldmethod=marker.
> 
> As an ex-Inmos person, where folding was almost a religion I'm a keen
> "folder". The "style" of folding used in some of those long gone editors
(Continue reading)

Bram Moolenaar | 1 Jul 2002 20:13
Picon

Re: folding: some questions and comments (long)


Paul Robins wrote:

> 1) Indent folded lines to the same level as the fold's contents:
> 
> eg:
> 
> if (some test) {
>     ... this stuff is folded
>     ... so is this
> 
>     if (some other test) {
>        ... also folded
>     }
> }
> 
> reads much nicer than :
> 
> if (some test) {
> +--  3 lines folded:  this stuff is folded --------------------------
> +--  6 lines folded:  so is this ------------------------------------
> 
>     if (some other test) {
> +--  6 lines folded:  also folded -----------------------------------
>     }
> }
> 
> is this possible ?

Yes, you can set 'foldtext' to suit your need.
(Continue reading)


Gmane