I'd like to write the modified buffer I'm currently editing to a temporary file periodically. In the background I could then, for example, use external tools to analyze the file.
I don't want to write the file to it real location in this process - I want the user to be in charge of that through the normal :w
command.
How can I do this in a vimscript called by the CursorHold
autocommand? Vim 7.4 and up is fine.
:[range]w !command
.