# Language: ConTeXt typesetting engine
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
# Former Maintainers: Nikolai Weibull <now@bitwi.se>
-# Latest Revision: 2026 Jan 10
+# Latest Revision: 2026 Feb 03
# Typesetting {{{
import autoload './typeset.vim'
export def ConTeXtCmd(path: string): list<string>
- var cmd = ['mtxrun', '--script', 'context', '--nonstopmode', '--autogenerate']
+ var cmd = ['mtxrun', '--script', 'context', '--paranoid', '--autogenerate']
if !empty(get(g:, 'context_extra_options', ''))
cmd += g:context_extra_options
endif
# Language: Generic TeX typesetting engine
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
-# Latest Revision: 2026 Jan 10
+# Latest Revision: 2026 Feb 03
# Constants and helpers {{{
const SLASH = !exists("+shellslash") || &shellslash ? '/' : '\'
env: dict<string> = {}
): bool
var fp = fnamemodify(path, ':p')
+ var name = fnamemodify(fp, ':t')
var wd = fnamemodify(fp, ':h')
var qfid = NewQuickfixList(fp)
return false
endif
- var jobid = job_start(Cmd(path), {
+ # Make sure to pass only the base name of the path to Cmd as this usually
+ # works better with TeX commands (note that the command is executed inside
+ # the file's directory). For instance, ConTeXt writes the path in .synctex
+ # files, and full paths break syncing from the editor to the viewer.
+ var jobid = job_start(Cmd(name), {
env: env,
cwd: wd,
in_io: "null",