views:

78

answers:

2

I often have around 10 tabs in GNU-Screen open with all of them having vim open to a different file. If I just kill the Screen session, then VIM doesn't cleanup (.swp files are still there), so I usually have to go to each tab individually and type ":wq" and the "exit" to kill the screen tab. Any faster ways to do this?

+4  A: 
killall vim

;-)

flurin
Won't this also leave the swap files on the filesystem?
sirlancelot
I did a test and it seemed to work.
flurin
A: 

I do something similar and ran into the same problem. What worked for me was to just turn off the creation of .swp files so vim doesn't care if I close the whole session at once. In my .vimrc:

set noswapfile

Of course this only works because I'm in the habit of saving often and almost everything is in version control so I could get it back if some catastrophe happened. Your mileage may vary if you have a different use case or work flow.

eremite