partial open and closing

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

partial open and closing

Ross Boylan
If I have an entry and I wish to see all subheads down to 2 deep, how do
I do that?

I think there is something basic about folds I'm not getting.  I tried
prefacing zo or zc with numbers, but it didn't seem to do anything.  For
example, zc says when a number is given, "that many folds deep" are
closed.  This seems to imply that folds deeper than the given number
will remain open--i.e., that the most detailed view would remain.  That
doesn't make any sense to me.

In experiments, the only thing I notice things like the zo/zO
distinction doing is that if I have
A
  B
  C
and B is collapsed when I collapse A, zo will leave B collapsed while zO
opens it up.  While I suppose remembering the collapsed structure might
be useful, it doesn't help with what I want.  If A is open all the way,
and B and C both have subitems, I would like to select A and get just B
and C to collapse if I select 1 level deep.

--
Ross Boylan                                      wk:  (415) 514-8146
185 Berry St #5700                               [hidden email]
Dept of Epidemiology and Biostatistics           fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739                     hm:  (415) 550-1062

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: partial open and closing

Noel Henson
On Wednesday 12 October 2005 01:16 pm, Ross Boylan wrote:

> If I have an entry and I wish to see all subheads down to 2 deep, how do
> I do that?
>
> I think there is something basic about folds I'm not getting.  I tried
> prefacing zo or zc with numbers, but it didn't seem to do anything.  For
> example, zc says when a number is given, "that many folds deep" are
> closed.  This seems to imply that folds deeper than the given number
> will remain open--i.e., that the most detailed view would remain.  That
> doesn't make any sense to me.
>
> In experiments, the only thing I notice things like the zo/zO
> distinction doing is that if I have
> A
>   B
>   C
> and B is collapsed when I collapse A, zo will leave B collapsed while zO
> opens it up.  While I suppose remembering the collapsed structure might
> be useful, it doesn't help with what I want.  If A is open all the way,
> and B and C both have subitems, I would like to select A and get just B
> and C to collapse if I select 1 level deep.

Ross,

I've read and reread you example and I don't understand. Can you give
a better example?

Noel

--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: partial open and closing

Ross Boylan
In reply to this post by Ross Boylan
Here's, I hope, a clearer example of what I'm trying to do.  
The outline looks like this (only the "names" of headlines are given):
1
  1.A
  1.B
    1.B.i
    1.B.ii
2.
  2.A
    2.A.i
    2.A.ii
  2.B
    2.B.i
    2.B.ii

I would like to position myself on 2 and issue a command so that only
one level down is displayed, with a result like this:
1
  1.A
  1.B
    1.B.i
    1.B.ii
2.
  2.A <fold>
  2.B <fold>

Is there a way to do that?

In other words, I want an effect similar to ,,2, but only affecting a
single set of subheads.

Thanks.
Ross

P.S. I'm not getting mail from the list for some reason; if you could cc
me that would be great.  This is in response to Noel's query.



_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Re: partial open and closing

Stefan Schmiedl
Ross Boylan (18.10. 17:53):

> Here's, I hope, a clearer example of what I'm trying to do.  

> I would like to position myself on 2 and issue a command so that only
> one level down is displayed, with a result like this:
> 1
>   1.A
>   1.B
>     1.B.i
>     1.B.ii
> 2.
>   2.A <fold>
>   2.B <fold>
>
> Is there a way to do that?

zC works from the inside out: if you zC on line 1.B.ii,
it's the same as zc'ing 1.B.ii, 1.B, 1. zC also closes
all folds within the visual selection, so move the cursor
to line 2. and do (in normal mode)

zcVzCzo

Let's single-step this:

zc  close the fold below this line
V   select every line within this fold
zC  close whatever fold you can find there
zo  open one fold level

:map <leader>1 zcVzCzoz.

makes this convenient to use via \1 (assuming you did not change the
global leader character).

hth,
s.

--
Stefan Schmiedl
+-------------------------------+----------------------------------------+
|Approximity GmbH               | EDV-Beratung Schmiedl                  |
|http://www.approximity.com     | Am Bräuweiher 4, 93499 Zandt, Germany  |
|mailto:[hidden email]  | Tel. (09944) 3068-98, Fax -97          |
+-------------------------------+----------------------------------------+
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner