document updated 15 years ago, on Dec 30, 2008
- manual
- writeups
- Linux.com: Folding fun
- The "au BufWinEnter * mkview" stuff is REALLY useful, that makes Vim remember the manual folds between invocations. Manual folds seem pretty weak and pointless until you use this.
- sessions can be used to save manual folds too
- mkview.vim — returns a formatted string viewInfo which contains the minimal information needed to restore manual folds
- to move all the lines under a fold (as in, delete from one spot, and paste somewhere else) (that is, BOTH the text content, as WELL as the fold structure):
- zc — close the fold
- dd — delete the entire fold into the buffer
- move somewhere else, and paste it
- zf'] to create a fold from the start of the paste (where the cursor is now) to the end of the paste (mark "]")