mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-05 16:48:38 +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
|
" &comments isn't reliable
|
||||||
if &ft == "c" || &ft == "cpp"
|
if &ft == "c" || &ft == "cpp"
|
||||||
return -1 != match(a:line, '/\*')
|
return -1 != match(a:line, '/\*')
|
||||||
|
elseif &ft == "perl" " catch POD in Perl
|
||||||
|
return -1 != match(a:line, '^=\w')
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
@ -31,6 +33,8 @@ endfun
|
||||||
fun! <SID>IsCommentEnd(line)
|
fun! <SID>IsCommentEnd(line)
|
||||||
if &ft == "c" || &ft == "cpp"
|
if &ft == "c" || &ft == "cpp"
|
||||||
return -1 != match(a:line, '\*/')
|
return -1 != match(a:line, '\*/')
|
||||||
|
elseif &ft == "perl" " catch POD
|
||||||
|
return -1 != match(a:line, '^=cut')
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue