onsdag 1. juni 2011 kl. 15:37:08 UTC+2 skrev Eric Weir følgende:
>
>
> I'm a Vim novice, and a writer not a programmer. I've perused the responses
> to questions about folding in the Vim FAQ. It's largely Greek to me. I have
> a couple questions: I understand folds can be indented. Is it possible to
> get Vim to wrap words to the indent column? Is there a way I can get folds
> to persist across a save and reload?
If I got your question right, it's about Vim in general, not
MacVim-specific, and so better suited for another list like vim_use, not
vim_mac, but here we go. My personal favorite when it comes to manual,
persistent folding is to use the marker foldmethod (:set foldmethod=marker).
You may add this as a modeline (see :help modeline) on the first line of the
file (vi: foldmethod=marker). Then write your file like this:
Header for section 1 {{{
Some header for section 1.1 {{{
lorem ipsum
...
}}}
...
}}}
But of course you may not like to have the "{{{" and "}}}"s in your file,
and then there are other foldmethods. Folds can be set using invisible
markers and saved (to an external file) using mkview (:help mkview). That
makes the file less transferable, since you may move the file to another
computer and not get the folds along, but that may or may not be a problem
for you. See for instance this page for more help:
http://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun
Word-wrapping: See :h wrap, :h textwidth
- Dan Michael
--
You received this message from the "vim_mac" 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