Sunday, 26 May 2013

vim set default to save buffer when TERM signal received

vim set default to save buffer when TERM signal received

I use multiple instances of vim. Currently I use a bash function
kv(){ a=($(pgrep vim)); kill ${a[@]}; } 
to terminate all running instances of vim. This has the drawback of leaving unsettled .swp files wherever a vim was killed with unsaved changes. Is there a way to set vim to save its buffers if it is sent a kill signal?

No comments:

Post a Comment