From b688758d3a4e4b4ee09ad08872642261477269fb Mon Sep 17 00:00:00 2001 From: Adrian Kreher Date: Mon, 29 Dec 2008 16:33:50 -0600 Subject: [PATCH] detectindent.vim: consider POD blocks in Perl to be comments to prevent confusion. --- vim/plugin/detectindent.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vim/plugin/detectindent.vim b/vim/plugin/detectindent.vim index ae3bb59..81dfb1e 100644 --- a/vim/plugin/detectindent.vim +++ b/vim/plugin/detectindent.vim @@ -23,6 +23,8 @@ fun! IsCommentStart(line) " &comments isn't reliable if &ft == "c" || &ft == "cpp" return -1 != match(a:line, '/\*') + elseif &ft == "perl" " catch POD in Perl + return -1 != match(a:line, '^=\w') else return 0 endif @@ -31,6 +33,8 @@ endfun fun! IsCommentEnd(line) if &ft == "c" || &ft == "cpp" return -1 != match(a:line, '\*/') + elseif &ft == "perl" " catch POD + return -1 != match(a:line, '^=cut') else return 0 endif