Thursday, August 13, 2015

RE: Open folds to a certain level within a range of lines

<snip>
> I actually use those two commands all the time. However, I may have
> many dozens of nested folds in a particular range. I was hoping that
> there was a command that can be applied over a range that can open
> folds down to a depth of (say) 3. I was not able to find such a
> command in the help.

If you are only wanting to open a few folds (and only every once in
a while), you could do something like:

:range foldopen

Then recall that command a few times. If your range is a selection,
it seems to work too.

Looks like it would be fairly easy to write a script to do this
for you. You'd want to do something like

:range foldopen

in a loop.

Vimscript is fairly easy to learn.

Good luck!

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment