I'd like that vim automatically compiles a lout document (similar to LaTeX) every time I save the document.

Is there a possibility to add such functionality to save? (Preferably without using anything else than :w to save.)

link|improve this question

55% accept rate
feedback

1 Answer

up vote 3 down vote accepted

You can do that with an autocommand. I don't have one that loads automatically, but if I know I'm going to be going through the edit-compile-edit cycle for a while with one file, I'll execute something like this at the Vim command line:

:au BufWritePost * make

You can replace make with whatever build or run command is appropriate.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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