Mercurial > vim
comparison runtime/compiler/context.vim @ 29756:2acb87ee55fc
Update runtime files
Commit: https://github.com/vim/vim/commit/e1f3fd1d02e3f5fe6d2b6d82687c6846b8e500f8
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 15 18:51:32 2022 +0100
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 15 Aug 2022 20:00:05 +0200 |
parents | 07d2b5a3b7cc |
children | d81556766132 |
comparison
equal
deleted
inserted
replaced
29755:e726ee71b93b | 29756:2acb87ee55fc |
---|---|
1 " Vim compiler file | 1 vim9script |
2 " Compiler: ConTeXt typesetting engine | |
3 " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> | |
4 " Last Change: 2016 Oct 21 | |
5 | 2 |
6 if exists("current_compiler") | 3 # Language: ConTeXt typesetting engine |
4 # Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> | |
5 # Former Maintainers: Nikolai Weibull <now@bitwi.se> | |
6 # Latest Revision: 2022 Aug 12 | |
7 | |
8 if exists("g:current_compiler") | |
7 finish | 9 finish |
8 endif | 10 endif |
9 let s:keepcpo= &cpo | |
10 set cpo&vim | |
11 | 11 |
12 if exists(":CompilerSet") != 2 " older Vim always used :setlocal | 12 import autoload '../autoload/context.vim' |
13 | |
14 if exists(":CompilerSet") != 2 # Older Vim always used :setlocal | |
13 command -nargs=* CompilerSet setlocal <args> | 15 command -nargs=* CompilerSet setlocal <args> |
14 endif | 16 endif |
15 | 17 |
16 " If makefile exists and we are not asked to ignore it, we use standard make | 18 g:current_compiler = 'context' |
17 " (do not redefine makeprg) | 19 |
18 if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) || | 20 if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) || |
19 \ (!filereadable('Makefile') && !filereadable('makefile')) | 21 (!filereadable('Makefile') && !filereadable('makefile')) |
20 let current_compiler = 'context' | 22 &l:makeprg = join(context.ConTeXtCmd(shellescape(expand('%:p:t'))), ' ') |
21 " The following assumes that the current working directory is set to the | |
22 " directory of the file to be typeset | |
23 let &l:makeprg = get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun')) | |
24 \ . ' --script context --autogenerate --nonstopmode --synctex=' | |
25 \ . (get(b:, 'context_synctex', get(g:, 'context_synctex', 0)) ? '1' : '0') | |
26 \ . ' ' . get(b:, 'context_extra_options', get(g:, 'context_extra_options', '')) | |
27 \ . ' ' . shellescape(expand('%:p:t')) | |
28 else | 23 else |
29 let current_compiler = 'make' | 24 g:current_compiler = 'make' |
30 endif | 25 endif |
31 | 26 |
32 let b:context_errorformat = '' | 27 const context_errorformat = join([ |
33 \ . '%-Popen source%.%#> %f,' | 28 "%-Popen source%.%#> %f", |
34 \ . '%-Qclose source%.%#> %f,' | 29 "%-Qclose source%.%#> %f", |
35 \ . "%-Popen source%.%#name '%f'," | 30 "%-Popen source%.%#name '%f'", |
36 \ . "%-Qclose source%.%#name '%f'," | 31 "%-Qclose source%.%#name '%f'", |
37 \ . '%Etex %trror%.%#mp error on line %l in file %f:%.%#,' | 32 "tex %trror%.%#error on line %l in file %f: %m", |
38 \ . 'tex %trror%.%#error on line %l in file %f: %m,' | 33 "%Elua %trror%.%#error on line %l in file %f:", |
39 \ . '%Elua %trror%.%#error on line %l in file %f:,' | 34 "%+Emetapost %#> error: %#", |
40 \ . '%+Emetapost %#> error: %#,' | 35 "%Emetafun%.%#error: %m", |
41 \ . '! error: %#%m,' | 36 "! error: %#%m", |
42 \ . '%-C %#,' | 37 "%-C %#", |
43 \ . '%C! %m,' | 38 "%C! %m", |
44 \ . '%Z[ctxlua]%m,' | 39 "%Z[ctxlua]%m", |
45 \ . '%+C<*> %.%#,' | 40 "%+C<*> %.%#", |
46 \ . '%-C%.%#,' | 41 "%-C%.%#", |
47 \ . '%Z...%m,' | 42 "%Z...%m", |
48 \ . '%-Zno-error,' | 43 "%-Zno-error", |
49 \ . '%-G%.%#' " Skip remaining lines | 44 "%-G%.%#"], ",") |
50 | 45 |
51 execute 'CompilerSet errorformat=' . escape(b:context_errorformat, ' ') | 46 execute 'CompilerSet errorformat=' .. escape(context_errorformat, ' ') |
52 | 47 |
53 let &cpo = s:keepcpo | 48 # vim: sw=2 fdm=marker |
54 unlet s:keepcpo |