ocaml.vim (2041B)
1 " Vim Compiler File 2 " Compiler: ocaml 3 " Maintainer: Markus Mottl <markus.mottl@gmail.com> 4 " URL: https://github.com/ocaml/vim-ocaml 5 " Last Change: 6 " 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) 7 " 2020 Mar 28 - Improved error format (Thomas Leonard) 8 " 2017 Nov 26 - Improved error format (Markus Mottl) 9 " 2013 Aug 27 - Added a new OCaml error format (Markus Mottl) 10 " 11 " Marc Weber's comments: 12 " Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt, 13 " ocamake and whatnot. So which one to use? 14 " 15 " This error format was moved from ftplugin/ocaml.vim to this file, 16 " because ftplugin is the wrong file to set an error format 17 " and the error format itself is annoying because it joins many lines in this 18 " error case: 19 " 20 " Error: The implementation foo.ml does not match the interface foo.cmi: 21 " Modules do not match case. 22 " 23 " So having it here makes people opt-in 24 25 26 if exists("current_compiler") 27 finish 28 endif 29 let current_compiler = "ocaml" 30 31 let s:cpo_save = &cpo 32 set cpo&vim 33 34 CompilerSet errorformat = 35 \%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:, 36 \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:, 37 \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#, 38 \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m, 39 \%+EReference\ to\ unbound\ regexp\ name\ %m, 40 \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m, 41 \%Wocamlyacc:\ w\ -\ %m, 42 \%-Zmake%.%#, 43 \%C%m, 44 \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', 45 \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', 46 \%D%*\\a:\ Entering\ directory\ `%f', 47 \%X%*\\a:\ Leaving\ directory\ `%f', 48 \%D%*\\a[%*\\d]:\ Entering\ directory\ '%f', 49 \%X%*\\a[%*\\d]:\ Leaving\ directory\ '%f', 50 \%D%*\\a:\ Entering\ directory\ '%f', 51 \%X%*\\a:\ Leaving\ directory\ '%f', 52 \%DEntering\ directory\ '%f', 53 \%XLeaving\ directory\ '%f', 54 \%DMaking\ %*\\a\ in\ %f 55 56 let &cpo = s:cpo_save 57 unlet s:cpo_save