annotate runtime/compiler/ocaml.vim @ 30243:b57d52934160 v9.0.0457

patch 9.0.0457: substitute prompt does not highlight an empty match Commit: https://github.com/vim/vim/commit/a04f457a6c071179bac4088c9314007d39d5c5e0 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 13 13:45:26 2022 +0100 patch 9.0.0457: substitute prompt does not highlight an empty match Problem: Substitute prompt does not highlight an empty match. Solution: Highlight at least one character.
author Bram Moolenaar <Bram@vim.org>
date Tue, 13 Sep 2022 15:00:05 +0200
parents 15fa3923cc49
children e1df51f68736
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5055
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim Compiler File
17261
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
2 " Compiler: ocaml
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
3 " Maintainer: Markus Mottl <markus.mottl@gmail.com>
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17261
diff changeset
4 " URL: https://github.com/ocaml/vim-ocaml
17261
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
5 " Last Change:
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17261
diff changeset
6 " 2020 Mar 28 - Improved error format (Thomas Leonard)
17261
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
7 " 2017 Nov 26 - Improved error format (Markus Mottl)
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
8 " 2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
5055
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 "
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 " Marc Weber's comments:
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 " Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 " ocamake and whatnot. So which one to use?
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 "
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 " This error format was moved from ftplugin/ocaml.vim to this file,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 " because ftplugin is the wrong file to set an error format
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 " and the error format itself is annoying because it joins many lines in this
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 " error case:
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 "
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 " Error: The implementation foo.ml does not match the interface foo.cmi:
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 " Modules do not match case.
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 "
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 " So having it here makes people opt-in
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17261
diff changeset
24
5055
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 if exists("current_compiler")
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 finish
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 endif
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 let current_compiler = "ocaml"
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 let s:cpo_save = &cpo
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 set cpo&vim
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 CompilerSet errorformat =
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17261
diff changeset
34 \%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:,
5055
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
17261
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
36 \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
5055
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 \%+EReference\ to\ unbound\ regexp\ name\ %m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 \%Wocamlyacc:\ w\ -\ %m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 \%-Zmake%.%#,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 \%C%m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 \%D%*\\a:\ Entering\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 \%X%*\\a:\ Leaving\ directory\ `%f',
17261
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
47 \%D%*\\a[%*\\d]:\ Entering\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
48 \%X%*\\a[%*\\d]:\ Leaving\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
49 \%D%*\\a:\ Entering\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
50 \%X%*\\a:\ Leaving\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
51 \%DEntering\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
52 \%XLeaving\ directory\ '%f',
5055
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 \%DMaking\ %*\\a\ in\ %f
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 let &cpo = s:cpo_save
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 unlet s:cpo_save