When I open multi windows like the below:
vim foo.txt bar.txt
Then, if close foo.txt
by :bw
then, close bar.txt
by :bw
- vim is still open! , it should close by
:q
- I don't want vim steel opened if the last buffer that already killed
- or do I want to make one keybinding to kill empty/non-empty windows too I want to make a map key to quit windows one by one like that:
function! Quitwindows()
if bufexists(0) && bufname(0) == ''
exe ':qall<cr>'
endif
endfunction
nnoremap <Space>q :call Quitwindows()
:bw
. :)