Thursday, June 2, 2011

Re: Svar: Folding


On Jun 2, 2011, at 6:56 AM, Dan Michael wrote:

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?

.... 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)....

Thanks, Dan. Both this method and the one using invisible markers and mkview are intriguing. I'll read up on them. Will probably have further questions after that.


Word-wrapping: See :h wrap, :h textwidth

And thanks for both of these. 

It appears that what I wanted in the way of word wrapping is [1] not possible except by fiddling with the code of the executable and [2] not essential for the purpose I had in mind, i.e., making all text within a certain range of a given line "disappear under" that line, as a subtopic would under a topic in an outline. I can get what I want, minus indentation, by folding on all the other lines first, then folding on all the lines, indluding the first.

------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA  USA




No comments:

Post a Comment