How can I quickly close multiple VI instances in different GNU-Screen tabs?
I often have around 10 tabs in GNU-Screen open with all of them having vim op开发者_开发技巧en 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?
killall vim
;-)
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.
精彩评论