On Nov 3, 2:36 pm, Ben Fritz <[EMAIL PROTECTED]> wrote:
> On Sep 26, 9:32 pm, "Benjamin Fritz" <[EMAIL PROTECTED]> wrote:
>
> > I've created a patch against the latest perl.vim syntax file available
> > at the location given in the syntax file:
>
> >http://www.van-laarhoven.org/vim/syntax/perl.vim
>
> > This patch corrects syntax folding so that it does not depend on
> > indentation, brace placement, or other coding style issues. I have
> > tried to keep functionality as close as possible to the original,
> > testing on the test file provided on the same website.
>
> > Please give it a shot and respond with any comments.
>
> >  perl.vim.diff
> > 4KViewDownload
>
> Two bugs that I've found while using this patch with real perl code:
>
> 1) Commented-out lines can end a fold region
> 2) The closing brace in code like $abc{def} ends fold regions
>
> Bug 1 is fixed by adding a skip group to the perlSubFold and
> perlBlockFold definitions: skip="#.*"
> Bug 2 is something I will try to fix later unless someone beats me to
> it.
>
> I have yet to see any feedback or developments on this other than an
> "I'll look at it" from the script maintainer. Has anyone tried this?

I just found this and patched the file.  Maybe I patched it
incorrectly (I don't have patch handy atm) but it seems to fold
anything with { and }, that is, if I do this:

sub foo {
   $blah->bar($self->{test});

   more..
}

just the first two lines get folded.

Hope that helps some.

-fREW

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui