annotate runtime/compiler/ocaml.vim @ 20727:5ffe112b1afd v8.2.0916

patch 8.2.0916: mapping with partly modifyOtherKeys code does not work Commit: https://github.com/vim/vim/commit/975a880a1389e8ce6dea8d66a7c109140b2f94ec Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 6 22:36:24 2020 +0200 patch 8.2.0916: mapping with partly modifyOtherKeys code does not work Problem: Mapping with partly modifyOtherKeys code does not work. Solution: If there is no mapping with a separate modifier include the modifier in the key and then try mapping again. (closes #6200)
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 Jun 2020 22:45:04 +0200
parents 432714f5c0f7
children 15fa3923cc49
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>
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
4 " URL: https://github.com/rgrinberg/vim-ocaml
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
5 " Last Change:
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
6 " 2017 Nov 26 - Improved error format (Markus Mottl)
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
7 " 2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
8 " 2013 Jun 30 - Initial version (Marc Weber)
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
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 if exists("current_compiler")
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 finish
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 endif
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 let current_compiler = "ocaml"
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 let s:cpo_save = &cpo
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 set cpo&vim
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 CompilerSet errorformat =
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
17261
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
34 \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
5055
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 \%+EReference\ to\ unbound\ regexp\ name\ %m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 \%Wocamlyacc:\ w\ -\ %m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 \%-Zmake%.%#,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 \%C%m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 \%D%*\\a:\ Entering\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 \%X%*\\a:\ Leaving\ directory\ `%f',
17261
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
45 \%D%*\\a[%*\\d]:\ Entering\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
46 \%X%*\\a[%*\\d]:\ Leaving\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
47 \%D%*\\a:\ Entering\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
48 \%X%*\\a:\ Leaving\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
49 \%DEntering\ directory\ '%f',
432714f5c0f7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 5055
diff changeset
50 \%XLeaving\ directory\ '%f',
5055
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 \%DMaking\ %*\\a\ in\ %f
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 let &cpo = s:cpo_save
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 unlet s:cpo_save