On Nov 5, 10:12 am, "fREW Schmidt" <[EMAIL PROTECTED]> wrote:
> So one of my coworkers just got mad at me for polluting a bunch of source
> code with fold markers, so I figured I should investigate syntax based
> folding.  The folding that comes out of the box for perl is mostly great.
>
> Anyway, I want to fold on anonymous subroutines as well as regular subs.
> For example, I have a huge chunk of code like this:
>
> %blah = (
>   foo => sub {
>     ...
>   },
>   bar => sub {
>     ...
>   },
> );
>
> I'd like to fold on the foo and bar parts.  Any ideas on how to do this?
> and if so I guess I just put the stuff in my ~/.vim/syntax/perl.vim?
>
> Any help at all would be appreciated.
>
> Thanks!
>

This thread might interest you:

http://groups.google.com/group/vim_dev/browse_thread/thread/e2a54d22c728d04b

Note that the patch is not yet in a state where it can be used (there
is a fairly major bug that ends folds prematurely), but my suspected
"best way forward," of giving an option to fold all {...} groups that
are not part of the specific groups already folded, would also fold
these constructs (if they are not folded already...I did tweak the
function folding a little).
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to