1

Maybe my title is not so clear; I Googled a lot about cleaning up temporary files after a PDF is generated, and find it is not recommand to remove it completely in each compile.

I do want to remove it in the final with one-or-two key press in Vim.

So my question is: Can we add some code to _vimrc such that I can define which kind of file shall be removed after the compile? (I mean success compile, auto-remove, at least when I ask to remove it by press key short.)

I hope it will work both on Windows and Unix systems. (Maybe needing different code.)

TeXnician
  • 33,589
user19832
  • 1,585

2 Answers2

2

you could use

:!del *.aux *.log *.out *.bbl *.blg ...

in vim and map this to a key you like (F11 for instance) in your vimrc file.

schmendrich
  • 3,908
1

I'm using a powershell script under windows to this end, I found it years ago here: http://uweziegenhagen.de/?p=2095

The first sentences on this page in German simply says something like »... after I found out how to make powershell work on a certain path, we can easily write a script which deletes all temporary files in a certain folder«. So take this script, save it as "cleaning.ps1" or something alike and start it as powershell script.

It doesn't work under Linux, of course. And you'll have to find out, how to start a powershell script from vim. Good luck!

Keks Dose
  • 30,892