From ce89b89c4967b5cad837e5dabb819eae32808280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Tue, 5 May 2015 06:18:51 +0200 Subject: [PATCH] Only use -outdir if needed (fixes #161) The -outdir option is only available in latexmk after version 4.27. --- autoload/vimtex/latexmk.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/vimtex/latexmk.vim b/autoload/vimtex/latexmk.vim index ab36f53..74b1ade 100644 --- a/autoload/vimtex/latexmk.vim +++ b/autoload/vimtex/latexmk.vim @@ -108,7 +108,10 @@ function! vimtex#latexmk#clean(full) " {{{1 else let cmd = 'cd ' . shellescape(data.root) . '; ' endif - let cmd .= 'latexmk -outdir=' . g:vimtex_latexmk_build_dir + let cmd .= 'latexmk' + if g:vimtex_latexmk_build_dir !=# '.' + let cmd .= ' -outdir=' . g:vimtex_latexmk_build_dir + endif let cmd .= a:full ? ' -C ' : ' -c ' let cmd .= vimtex#util#fnameescape(data.base) let exe = {