Loading ...
Sorry, an error occurred while loading the content.

123710Re: Folding

Expand Messages
  • Eric Weir
    Jun 3, 2011
    • 0 Attachment
      On Jun 2, 2011, at 11:02 AM, Ben Fritz wrote:

      > Ah, so you want to modify what is displayed in place of the folded
      > text. This is certainly possible, using the 'foldtext' option.
      > If you can specify exactly what you want folded text to look like,
      > someone can help you make one. Or you can try your hand yourself.
      > There are a couple of examples at :help fold-foldtext and also
      > http://vim.wikia.com/wiki/Folding_for_plain_text_files_based_on_indentation
      > and http://vim.wikia.com/wiki/Customize_text_for_closed_folds. The
      > first link above may be very close to what you are looking for by
      > itself.

      Thanks, Ben. What I would like is that the line displayed by the fold be simply the first screen line of text of the fold.

      I took a look at the suggestions at the links above. While they address folding generally, rather what's displayed by the fold, I found the first especially interesting. I really am not a programmer, however, and at this point at least, couldn't begin trying to implement what's described there.

      A link provided at the first link http://jfi.uchicago.edu/~tten/for%20geeks/Vim_editor/ provides an alternative based on "reverse indenting" -- I don't understand the rationale for employing "reverse indenting" -- that comes as close as I've seen to what I want, including hierarchical outlining without a plugin or special coding of files, and an uncluttered fold display. Just the first line of the folded text is displayed. Again, however, as close as it seems to what I want, I am again definitely not in a position to take on implementing it at this time.

      Something somewhere in the reading to which I was led by your response led me to this really good overview of folding on Vim Tips that I think I need to study. http://vim.wikia.com/wiki/Folding#Indent_folding One option discussed there is one that provides for folding based on indents and manual folding that looks similar to a suggestion to which I was led by a response on mac_vim that provides for retention of folds across a save and reload. It' very simple, but for some reason is not working for me exactly as described. [I'm getting error messages and recently saved folds are opening with fewer lines folded than were saved.]

      I know I'm being vague. I'm getting clearer as I pursue the suggestions I'm getting, at least about what I want. Definitely not very clear yet how to get it. But I am not a programmer. This is not something I need to do. It's something I want to do. I accept that it's going to take time, and that a fair bit of learning will be involved.

      Thanks again,
      Eric Weir
      Decatur, GA USA

      You received this message from the "vim_use" 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
    • Show all 24 messages in this topic