Friday, February 22, 2013

Re: How to "fold more" only over specified range of lines

On Feb 22, 12:12 pm, Ben Fritz <fritzophre...@gmail.com> wrote:
>On Friday, February 22, 2013 9:24:57 AM UTC-6, Paul wrote:
>> For vim folds, "zm" and "zr" decreases and increases the depth of
>>
>> visible folds. Is there a way to modify the folds in this manner
>> but
>>
>> only over a range of lines (perhaps delineated by 'a and 'b)?
>
> I don't know of a command to do this. If there is not one listed at
> :help fold-commands, it probably doesn't exist.
>
> It might be possible to script such a command, making use of the
> :foldopen and :foldclose commands. But this isn't a trivial task; I
> don't know of an easy way to get a list of all folds on a line and
> the depth, for nested folds. You can look at
> $VIMRUNTIME/syntax/2html.vim for how the fold information in a file
> is found and stored in usable form. If there's an easier way to do
> it I'd love to know about it.

For now, I think I'll just apply :foldopen and :foldclose to line
ranges instead. Thanks.

--
--
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/groups/opt_out.

No comments: