mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00
detectindent.vim: consider POD blocks in Perl to be comments to prevent confusion.
This commit is contained in:
parent
99531235e8
commit
b688758d3a
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue