lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.5k stars 389 forks source link

[Ques]: Keep the working dir clean? #3021

Closed niksingh710 closed 1 week ago

niksingh710 commented 1 week ago

image The compilation process generates multiple files but is there any way to keep the working dir clean? like telling the compiler to store the temp file in /tmp or somewhere else?

and keeping the pdf file only?

Felipe-9 commented 1 week ago

you can set aux_dir = ".build" for example, the compiler will create the dir and send all auxiliary tex files to it, keeping only the tex, pdf and synctex.gz file on the current directory.

add this to your vimtex.lua config inside init = function() ... end:

vim.g.vimtex_compiler_latexmk = {
  aux_dir = ".build" -- you can set here whatever name you desire
}
lervag commented 1 week ago

What @Felipe-9 said - and it's the only good solution in my opinion. 🤷🏻