Wednesday, September 28, 2011

Re: Folding recursively/levels

On Wed, 28 Sep 2011, philipx wrote:

> Hi.
>
> I'm having troubles understanding folding, in particular the recursive
> folding.
>
> I expect that if I fold a multi-level document (e.g. XML) with "zC" -
> "Close all folds under the cursor recursively", and then I execute
> "zo" on the fold, it would "Open one fold under the cursor", meaning
> that it keeps lower levels folded.
>
> Say you have this xml document (fdm=syntax,
> g:xml_syntax_folding=1,foldlevelstart=99).
> A
> B
> C
> C
> B
> C...
> B
> C...
>
> Execute zC on the A node:
> --- xx lines: <A>------
> Now executing zo on that line, I would expect to see the following:
> A
> -- xx lines: <B>-----
> -- xx lines: <B>-----
> -- xx lines: <B>-----
>
> Instead the whole tree opens up, which is what I would expect to
> happen if I used zO not zo.
>
> Are my expectations wrong? Is there a way to achieve this incremental
> unfolding I am looking for?

Your expectations match what I observe.

Maybe there is a mapping that prevents zo from only opening one fold?
If so:

:map zo

will show you.

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: