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

80901Re: Open all folds in the current fold?

Expand Messages
  • Andy Wokula
    Jun 4 4:31 AM
      Tim Chase schrieb:
      > I'm trying to find/create a command that acts somewhat like zO/zR
      > for within an existing fold.
      >
      > If I use zR, it opens all the folds in the whole document.
      >
      > If I use zO, it opens all the folds under the cursor.
      >
      > The behavior I'm looking for is that if I'm within an existing
      > fold, it recursively opens all the folds within the current fold:
      >
      > --- line 1
      > | line 2 with cursor here
      > |-- line 3
      > || line 4
      > ||+ line 5 (3 lines)
      > || line 8
      > ||+ line 9 (5 lines)
      > |+ line 10 (20 lines)
      > |+ line 30 (15 lines)
      > | more stuff
      > after the fold
      > + some other fold I don't want to touch
      >
      > With the cursor on line two, I'd like to recursively open all the
      > folds in the containing fold (lines 1 through "more stuff").
      > Using zO does nothing because there's no currently closed fold
      > under the cursor even though there are other folds within the
      > currently containing fold. Using zR opens lines such as the
      > "some other fold I don't want to touch" line which is more than I
      > want to unfold.
      >
      > Any hints on this? I've toyed a little with :folddoclosed but it
      > seems to be closer to zR than I want for my purposes.
      >
      > Thanks,
      >
      > -tim

      zO on visual area recursively opens all folds in it.

      mc[zV]zzO`c

      --
      Regards,
      Andy
    • Show all 4 messages in this topic