[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-dev
Subject:    Re: How can I move folded text ?
From:       Bram Moolenaar <Bram () moolenaar ! net>
Date:       2003-11-14 19:25:36
[Download RAW message or body]


Ron Aaron wrote:

> I have a file which I have folded manually.  I decide I want to
> re-arrange the text by moving a fold to another place.  That is to say,
> I want to take all the lines in a fold, and move them to another part of
> the file.
> 
> What I am currently doing is do dd on the fold, which deletes it and all
> the lines associated with it.  Then I move to the place I want to insert
> the text, and do p 
> 
> While the text *does* move just fine, it is no longer folded, and zc
> tells me there is no fold there.
> 
> Is there a way to do what I want, which is to keep the fold information
> (and keep folds folded) in such  a scenario?

You can at least use the '[ and '] marks to locate the start and end of
the text.  Thus '[zf'] would create a fold for it.

-- 
How To Keep A Healthy Level Of Insanity:
10. Ask people what sex they are. Laugh hysterically after they answer.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic