From b4ddee111679012194a1e3ba78299ac540c51c77 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Apr 2024 08:13:21 +0800 Subject: [PATCH] vim-patch:fb8f31ea7d7f (#28356) runtime(doc): document pandoc compiler and enable configuring arguments closes: vim/vim#14550 https://github.com/vim/vim/commit/fb8f31ea7d7f3f42e9bdce7b4434fd93fba8876f Co-authored-by: Konfekt --- runtime/compiler/pandoc.vim | 1 + runtime/doc/quickfix.txt | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/runtime/compiler/pandoc.vim b/runtime/compiler/pandoc.vim index 1b171a1cb8..6c151930c5 100644 --- a/runtime/compiler/pandoc.vim +++ b/runtime/compiler/pandoc.vim @@ -46,6 +46,7 @@ execute 'CompilerSet makeprg=pandoc\ --standalone' . \ '\ --metadata\ title=%:t:r:S' . \ '\ --metadata\ lang=' . matchstr(&spelllang, '^\a\a') . \ '\ --from=' . s:PandocFiletype(&filetype) . + \ '\ ' . escape(get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', '')), ' ') . \ '\ --output\ %:r:S.$*\ %:S' CompilerSet errorformat="%f",\ line\ %l:\ %m diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 9037ecc0f9..b4c2b7c192 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1282,6 +1282,15 @@ g:compiler_gcc_ignore_unmatched_lines commands run from make are generating false positives. +PANDOC *quickfix-pandoc* *compiler-pandoc* + +The Pandoc compiler plugin expects that an output file type extension is +passed to make, say :make html or :make pdf. + +Additional arguments can be passed to pandoc: + +- either by appending them to make, say `:make html --self-contained` . +- or setting them in `b:pandoc_compiler_args` or `g:pandoc_compiler_args` PERL *quickfix-perl* *compiler-perl*