开发者

Close all viewports (split screens) in Vim at once

开发者 https://www.devze.com 2023-01-30 21:59 出处:网络
When I use Vim I tend to split my screen in various ways, but when I want to close the editor I have to close each split separately.开发者_如何学运维Is there a way to close all the splits at one regar

When I use Vim I tend to split my screen in various ways, but when I want to close the editor I have to close each split separately.开发者_如何学运维 Is there a way to close all the splits at one regardless of how many splits I have open?


Use :qa for "quit all".

If you have unsaved buffers you'll have to add a bang: :qa!.


If you want to save all the splits as well type :wqa


If I understand correctly, :qall is what you want.


It has already been mentioned that :qa is what you want.

Because I (used to)* want this so often, I have added these to my .vimrc:

" missing ZZ and ZQ counterparts:
" quick save-buffer and quit-everything
nnoremap ZS :w<CR>
nnoremap ZX :qa<CR>

* I don’t work much with splits any more since I found the qbuf plugin.

0

精彩评论

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

关注公众号