开发者

How can I quickly close multiple VI instances in different GNU-Screen tabs?

开发者 https://www.devze.com 2022-12-21 10:36 出处:网络
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 t

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消