detectindent.vim: consider POD blocks in Perl to be comments to prevent confusion.

This commit is contained in:
Adrian Kreher 2008-12-29 16:33:50 -06:00
parent 99531235e8
commit b688758d3a

View file

@ -23,6 +23,8 @@ fun! <SID>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! <SID>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