Reputation: 10573
I want vim to compile my latex file after i change it in the buffer so i did :
au! InsertLeave *.tex :silent! update % | :silent! call Tex_CompileLatex()
However, it works only for leaving insert mode. I want the command to run whenever i make some changes to the buffer, e.g., after i "dd" a line, or replace a character by 'r', is there a way to do that? also, "call Tex_CompileLatex()" takes some time to return, is there a way to run it in async way so i dont have to wait in vim?
I am not familiar with vimscript, thanks for helping!
Upvotes: 0
Views: 258
Reputation: 31040
Every time you make a motion seems a little bit too often, but you could accomplish it with CursorMoved
or CursorMovedI
. The asynchronous suggestion would require tweaking with vim-latex. If you wanted a simpler option that just ran a single LaTeX command on the current file you could use :help system()
to make a system call in the background.
Upvotes: 1