Vim – Trigger action\script on save\write

hookscriptingvim

This might be better for super user, but I figure as a tool of the trade it might be a better topic for here. I find often when editing in vim that I exit out, run some script that I am testing, and then go back into vim (yes I realize I can use :!command to run things from vim) I was just wondering if there is a way to hook something to run when the file is saved (:w)?

Best Answer

You might find incron of interest if you're using Linux.