[Vimoutliner] confused about folds

Ross Boylan ross at biostat.ucsf.edu
Mon Aug 28 15:37:51 EDT 2006


I've been using vo for quite awhile without ever quite understanding
folds and the zo, zO, zc, zC commands.  I think I don't quite have the
mental model.  I'd appreciate any help or pointers; I have
reviewed :help fold and usr_28.txt.

Many things that I expect to operate down operate up.  Perhaps the first
sign of trouble was in user_28:
------------------------------
Folds can be nested: A region of text that contains folds can be folded
again.  For example, you can fold each paragraph in this section, and
then fold all the sections in this chapter. 
------------------------------
The nesting here appears to be outward, whereas I think of smaller
sections nesting inside of bigger ones.  The manual proper refers to
zC              Close all folds under the cursor recursively
"Under" to me means physically under, which is also conceptually under
(a subpart).  But the actual behavior appears to be up.

Consider this file
A
    B
    C
        c1
        c2
            c2a
            c2b


On c2a, zc collapses up to c2; I would expect it to be a no-op.
On c2, zc collapses c2a and c2b, as I would expect.

On C, zc collapses all the subparts.  The reference says
"zc Close one fold under the cursor.  When a count is given, that
many folds deep are closed."  This makes no sense to me; it seems to say
that zc will close c1 and c2, but leave c2a and c2b open.

On c1, ZC collapses all the way *up* to A.  zc with arguments collapses
up the tree to varying extents.
-- 
Ross Boylan                                      wk:  (415) 514-8146
185 Berry St #5700                               ross at biostat.ucsf.edu
Dept of Epidemiology and Biostatistics           fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739                     hm:  (415) 550-1062



More information about the VimOutliner mailing list