Hi, i think that i've just fixed a folding-related bug in perl indentation plugin ( indent/perl.vim ) in vim 7.2.
I have the following Perl settings in my .vimrc:
" Perl
let perl_fold=1
let perl_fold_blocks=1
let perl_include_pod=1
When I'm trying to indent ( with gg=G ) the following code:
while ($x--) {
print "x = $x\n";
}
it becomes:
while ($x--) {
print "x = $x\n";
}
i.e. print loses its indentation, that is clearly a bug.
Fix is very simple, here is the diff output between default and fixed plugin
files:
$ diff /usr/local/share/vim/vim72/indent/perl.vim perl.vim
136c136
< \ || synid =~ '^perl\(Sub\|BEGINEND\|If\)Fold'
---
> \ || synid =~ '^perl\(Sub\|BEGINEND\|If\|Block\)Fold'
151c151
< \ || synid =~ '^perl\(Sub\|BEGINEND\|If\)Fold'
---
> \ || synid =~ '^perl\(Sub\|BEGINEND\|If\|Block\)Fold'
Patch is attached.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
indent.patch
Description: Binary data
