TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't find the appropriate setting in gVim. Is there a way to manually edit my setting file to clean aux files after compile?


share|improve this question
While Yossi raises some good points, they haven't answered the question! I want to do this too (albeit, with log and synctex files, and when I close vim). Did you ever find a workable solution? – Zxaos Dec 20 '10 at 2:07
@Zxaos It is certain that it can be done, but it is a vim-related question. It would be better to ask here superuser.com/questions/tagged/vim – pmav99 Apr 22 '11 at 13:04
up vote 5 down vote accepted

hmmmm. Are you sure you want to do this? You need .aux files for subsequent compiles and sometime you need to compile three times until everything is worked out properly (like with note connections, I think). It might be better to set up your editor so that it cleans up when you close the file, or close the editor, or something like that.....cleaning up after every compile smells like trouble to me. Not that I know how to do that...but I'm just sayin'.

share|improve this answer
Well, latex-suite already tries to take care of compiling the document multiple times if necessary, so theoretically that should not be a problem. The question is how robust is the algorithm latex-suite uses to decide if additional compiles are necessary. I never had problems with it, but I rarely work with documents that would need more than two compilation cycles. – Jan Hlavacek Oct 28 '10 at 16:42
I have yet to find a solution that fits in every situation. I eventually stopped relying on automatic compilation and just issue the needed commands myself. My edit-compile-examine loop has gotten longer over time though as I generally know what normal text and math will look like. When I was less experienced, I used to compile more frequently. – TH. Oct 28 '10 at 21:51
Good points! I hadn't thought about times when I have to compile multiple times for refs and bibs. Thanks! – Richard Herron Oct 29 '10 at 2:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.