ocaml comment support for detectindent

This commit is contained in:
Adrian Kreher 2010-01-19 18:30:11 -06:00
parent 4bb177d29a
commit 267f9a8c80

View file

@ -23,6 +23,8 @@ fun! <SID>IsCommentStart(line)
" &comments isn't reliable
if &ft == "c" || &ft == "cpp" || &ft == "java" || &ft == "scala"
return -1 != match(a:line, '/\*')
elseif &ft == "ocaml" " ocaml comments
return -1 != match(a:line, '(\*')
elseif &ft == "perl" " catch POD in Perl
return -1 != match(a:line, '^=\w')
else
@ -33,6 +35,8 @@ endfun
fun! <SID>IsCommentEnd(line)
if &ft == "c" || &ft == "cpp" || &ft == "java" || &ft == "scala"
return -1 != match(a:line, '\*/')
elseif &ft == "ocaml" " ocaml comments
return -1 != match(a:line, '\*(')
elseif &ft == "perl" " catch POD
return -1 != match(a:line, '^=cut')
else