Bram Moolenaar | 14b6945 | 2013-06-29 23:05:20 +0200 | [diff] [blame] | 1 | " Vim Compiler File |
| 2 | " Compiler: ocaml |
| 3 | " Maintainer: See ftplugin/ocaml.vim (?) |
| 4 | " Last Change: June 2013 by Marc Weber |
| 5 | " |
| 6 | " Marc Weber's comments: |
| 7 | " Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt, |
| 8 | " ocamake and whatnot. So which one to use? |
| 9 | " |
| 10 | " This error format was moved from ftplugin/ocaml.vim to this file, |
| 11 | " because ftplugin is the wrong file to set an error format |
| 12 | " and the error format itself is annoying because it joins many lines in this |
| 13 | " error case: |
| 14 | " |
| 15 | " Error: The implementation foo.ml does not match the interface foo.cmi: |
| 16 | " Modules do not match case. |
| 17 | " |
| 18 | " So having it here makes people opt-in |
| 19 | |
| 20 | |
| 21 | if exists("current_compiler") |
| 22 | finish |
| 23 | endif |
| 24 | let current_compiler = "ocaml" |
| 25 | |
| 26 | let s:cpo_save = &cpo |
| 27 | set cpo&vim |
| 28 | |
| 29 | CompilerSet errorformat = |
| 30 | \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:, |
| 31 | \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m, |
| 32 | \%+EReference\ to\ unbound\ regexp\ name\ %m, |
| 33 | \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m, |
| 34 | \%Wocamlyacc:\ w\ -\ %m, |
| 35 | \%-Zmake%.%#, |
| 36 | \%C%m, |
| 37 | \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', |
| 38 | \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', |
| 39 | \%D%*\\a:\ Entering\ directory\ `%f', |
| 40 | \%X%*\\a:\ Leaving\ directory\ `%f', |
| 41 | \%DMaking\ %*\\a\ in\ %f |
| 42 | |
| 43 | let &cpo = s:cpo_save |
| 44 | unlet s:cpo_save |