vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

context.vim (1240B)


      1 vim9script
      2 
      3 # Language:           ConTeXt typesetting engine
      4 # Maintainer:         Nicola Vitacolonna <nvitacolonna@gmail.com>
      5 # Former Maintainers: Nikolai Weibull <now@bitwi.se>
      6 # Contributors:       Enno Nagel
      7 # Last Change:        2026 Jan 10
      8 
      9 if exists("g:current_compiler")
     10   finish
     11 endif
     12 
     13 import autoload '../autoload/context.vim'
     14 
     15 g:current_compiler = 'context'
     16 
     17 if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) ||
     18   (!filereadable('Makefile') && !filereadable('makefile'))
     19   var makeprg =  join(context.ConTeXtCmd(shellescape(expand('%:p:t'))), ' ')
     20   execute 'CompilerSet makeprg=' .. escape(makeprg, ' ')
     21 else
     22   g:current_compiler = 'make'
     23 endif
     24 
     25 const context_errorformat = join([
     26   "%-Popen source%.%#> %f",
     27   "%-Qclose source%.%#> %f",
     28   "%-Popen source%.%#name '%f'",
     29   "%-Qclose source%.%#name '%f'",
     30   "%E! %m",
     31   "%Ztex %trror%.%#error on line %l in file %f",
     32   "%Elua %trror%.%#error on line %l in file %f:",
     33   "%+Emetapost %#> error: %#",
     34   "%Emetafun%.%#error: %m",
     35   "%-C %#",
     36   "%C! %m",
     37   "%Z%.%#[ctxlua]:%l:%m",
     38   "%+C<*> %.%#",
     39   "%-C%.%#",
     40   "%Z...%m",
     41   "%-Zno-error",
     42   "%-G%.%#"], ",")
     43 
     44 execute 'CompilerSet errorformat=' .. escape(context_errorformat, ' ')
     45 
     46 # vim: sw=2 fdm=marker