Vimtex: Shell Escape Option

Created on 3 Jun 2016  路  2Comments  路  Source: lervag/vimtex

Hi small question, how can I enable the shell escape option, so I can use packages like minted.

So I'm asking: How can I enable pdflatex -shell -escape for documents using vimtex.

Thanks.

Most helpful comment

Option vimtex_latexmk_options is deprecated. As per latest help document, it says to use 'vimtex_compiler_latexmk'. Place following code in your .vimrc:

let g:vimtex_compiler_latexmk = {
    \ 'options' : [
    \   '-pdf',
    \   '-shell-escape',
    \   '-verbose',
    \   '-file-line-error',
    \   '-synctex=1',
    \   '-interaction=nonstopmode',
    \ ],
    \}

See :h vimtex_compiler_latexmk

All 2 comments

You can do this in two ways:

  1. Use a .latexmkrc file and put it in your $HOME or at the project level. Use e.g. the following file content:

perl $pdflatex = 'pdflatex --shell-escape %O %S';

  1. Use a custom setting for g:vimtex_latexmk_options, e.g.

vim let g:vimtex_latexmk_options = '-pdf -shell-escape -verbose -file-line-error -synctex=1 -interaction=nonstopmode'

See :h g:vimtex_latexmk_options.

Option vimtex_latexmk_options is deprecated. As per latest help document, it says to use 'vimtex_compiler_latexmk'. Place following code in your .vimrc:

let g:vimtex_compiler_latexmk = {
    \ 'options' : [
    \   '-pdf',
    \   '-shell-escape',
    \   '-verbose',
    \   '-file-line-error',
    \   '-synctex=1',
    \   '-interaction=nonstopmode',
    \ ],
    \}

See :h vimtex_compiler_latexmk

Was this page helpful?
0 / 5 - 0 ratings

Related issues

itsShnik picture itsShnik  路  5Comments

thomasahle picture thomasahle  路  4Comments

andregpss picture andregpss  路  5Comments

lervag picture lervag  路  5Comments

sharethewisdom picture sharethewisdom  路  3Comments