vim: fix latex compiler to pdflatex
This commit is contained in:
parent
b8b5a9f45e
commit
9641482295
@ -71,13 +71,14 @@ colorscheme nord
|
|||||||
""" Autocompile RMarkdown on save if flag is set in file
|
""" Autocompile RMarkdown on save if flag is set in file
|
||||||
" Define a function to check for the autocompile flag and compile if present
|
" Define a function to check for the autocompile flag and compile if present
|
||||||
function! CompileRMarkdown()
|
function! CompileRMarkdown()
|
||||||
let autocompile = search('<\!--\s\+vim:\s\+set\s\+autocompile=true\s\+-->', 'nW') != 0
|
let autocompile = search('<\!--\s\+vim:\s\+set\s\+autocompile=true:\s\+-->', 'nW') != 0
|
||||||
if autocompile
|
if autocompile
|
||||||
silent !Rscript -e 'rmarkdown::render("%")'
|
silent !Rscript -e 'rmarkdown::render("%")'
|
||||||
redraw!
|
redraw!
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
" Automatically compile RMarkdown on buffer write
|
" Automatically compile RMarkdown on buffer write
|
||||||
autocmd BufWritePost *.Rmd call CompileRMarkdown()
|
autocmd BufWritePost *.Rmd call CompileRMarkdown()
|
||||||
|
|
||||||
@ -190,7 +191,7 @@ let g:vimtex_compiler_latexmk = { 'build_dir' : '',
|
|||||||
\ 'executable' : 'latexmk',
|
\ 'executable' : 'latexmk',
|
||||||
\ 'hooks' : [],
|
\ 'hooks' : [],
|
||||||
\ 'options' : [
|
\ 'options' : [
|
||||||
\ '-xelatex',
|
\ '-pdflatex="pdflatex --shell-escape %O %S"',
|
||||||
\ '-verbose',
|
\ '-verbose',
|
||||||
\ '-file-line-error',
|
\ '-file-line-error',
|
||||||
\ '-synctex=1',
|
\ '-synctex=1',
|
||||||
|
Loading…
Reference in New Issue
Block a user