Hi vimmers,

I mostly code Perl5, and I use the 1TBS style (
http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS).

When I fold up a code block, I'd like Vim to fold up all the code in the
block, plus the closing brace.  So, given this code:

sub foo {
    print "this is line 1";
    print "this is line 2";
    print "this is line 3";
    print "this is line 4";
}

I'd like to fold it up so it looks like:

sub foo {
+---- 5 lines ---------------------------------

Is there a way to do that?  with foldmethod=indent I get the closing brace
outside of the fold like this:
sub foo {
+---- 4 lines ---------------------------------
}

and with foldmethod=syntax I get:

 +--- 6 lines: sub foo {------------------------------------------

which I find is difficult to pick out the sub name from the rest of the
foldtext text.

Investigating a new foldtext setting is my next step if the above can't be
done, though I find the foldtext stuff to be even more confusing voodoo than
the foldmethod stuff, and the wiki shows only a couple of foldtext recipes
that don't appeal to me much (if you have a cool recipe for foldtext, please
share!).

Thanks,
Dan

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

Reply via email to