For folding it doesn't matter if the below is folded recursively. It is more important for unfolding. It allows you to unfold an entire sub, or just the single level.
Imagine:
sub abc { my ($x) = @_; my $z; foreach my $y (@{ $x }) { # do xxx # on # lots # of # lines } return $z; }
when it is folded it would be (kinda like this in vim)
+-- 14 lines: sub abc {
when you unfold, would you get back the initial example, or
sub abc { my ($x) = @_; my $z; +--- 7 lines: foreach my $y (@{ $x }) { return $z; }
That is the purpose of recursive folding IMHO.
In Vim, it remembers the folded status of things, so if it is in the first example and you fold to the second example, when you unfold, it goes back to the first example. However, if you fold recursively, the default unfold will unfold to the third example.
In reply to Re: Code Folding
by afresh1
in thread Code Folding
by sir_lichtkind
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |