mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00
ocaml comment support for detectindent
This commit is contained in:
parent
4bb177d29a
commit
267f9a8c80
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" || &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
|
||||
|
|
Loading…
Add table
Reference in a new issue