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

29631Re: vim: folding feature request

Expand Messages
  • Benji Fisher
    Sep 5, 2002
    • 0 Attachment
      David Bustos wrote:
      >
      > Quoth Benji Fisher on Thu, Sep 05, 2002 at 01:08:04PM -0400:
      > > On Thursday, September 5, 2002, at 03:37 AM, David Bustos wrote:
      > > >Shouldn't "zO" recursively open folds even in already-open folds?
      > >
      > > I just tried, and it seems to. Maybe I do not understand what you
      > > mean. Please give an example of what happens and what you think should
      > > be different. If I keep typing, I can probably give you enough lines of
      >
      > Suppose my file is
      >
      > line 1
      > line 2
      > line 3
      > line 4
      >
      > and I create two folds (shown as though fdc=3):
      >
      > - line 1
      > |+ +--- 2 lines: line 2------------------------------------------------
      > | line 4
      >
      > With the cursor on line 1, I want "zO" to open the line 2 fold and any
      > other folds that the line 1 fold contains. This would be useful when I
      > open a fold, discover nested folds, and want to open them, too. Right
      > now I have to reclose the fold so I can do zO, but I think this
      > alteration would be useful and not in conflict with the documentation.

      The docs refer to "folds under the cursor," which I read as a pretty good
      description of the current behavior. If you want the behavior you describe, I
      think a simple work-around is to add

      :nnoremap zO zCzO

      to your vimrc file.

      HTH --Benji Fisher
    • Show all 4 messages in this topic