when i open multi windows like bellow:
vim foo.txt bar.txt
then , if i'm closing foo.txt
by :bw
then ,i'm closing bar.txt
by :bw
- vim still open ! , i must close by
:q
- i don't want vim open if last buffer killed
- or i want to make one keybinding for kill empty/non-empty window too i want to make mapkey to quil windows one by one like that:
function! Quitwindows()
if bufexists(0) && bufname(0) == ''
exe ':qall<cr>'
endif
endfunction
nnoremap <Space>q :call Quitwindows()
:bw
. :)