Sometimes I edit a file that represents a server restart. I would like to “bind” this restart to my vim session, so, after saving a file, it would call a bash script that would restart for me.
For example, calling :wapache automatically calls restart_apache.sh somewhere in my machine.
Is this possible? Is there a plugin that would organize these scripts inside .vim directory?
You could presumably add something like the following to your vimrc:
So that each time you save a file in the apache conf dir, vim executes your restart_apache.sh. You’d have to work out your permissions and what not.
I personally do not know of a script that manages these types of actions for you.