Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions autoload/vimtex/compiler/latexmk.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ endfunction

"}}}1

function! vimtex#compiler#latexmk#wrap_append_cmd_option(name, value) abort " {{{1
return has('win32')
\ ? ' -e "$' . a:name . ' .= '';' . a:value . '''"'
\ : ' -e ''$' . a:name . ' .= ";' . a:value . '"'''
endfunction

"}}}1

function! vimtex#compiler#latexmk#get_rc_opt(root, opt, type, default) abort " {{{1
"
" Parse option from .latexmkrc.
Expand Down Expand Up @@ -263,7 +271,7 @@ function! s:compiler.build_cmd() abort dict " {{{1
\ 'failure_cmd' : 'vimtex_compiler_callback_failure',
\})
let l:func = 'echo ' . l:val
let l:cmd .= vimtex#compiler#latexmk#wrap_option(l:opt, l:func)
let l:cmd .= vimtex#compiler#latexmk#wrap_append_cmd_option(l:opt, l:func)
endfor
elseif empty(v:servername)
call vimtex#log#warning('Can''t use callbacks with empty v:servername')
Expand All @@ -280,7 +288,7 @@ function! s:compiler.build_cmd() abort dict " {{{1
\ . vimtex#util#shellescape('""')
\ . ' --servername ' . vimtex#util#shellescape(v:servername)
\ . ' --remote-expr ' . l:callback
let l:cmd .= vimtex#compiler#latexmk#wrap_option(l:opt, l:func)
let l:cmd .= vimtex#compiler#latexmk#wrap_append_cmd_option(l:opt, l:func)
endfor
endif
endif
Expand Down