13 lines
344 B
VimL
13 lines
344 B
VimL
|
" Use Q to intelligently close a window
|
||
|
" (if there are multiple windows into the same buffer)
|
||
|
" or kill the buffer entirely if it's the last window looking into that buffer
|
||
|
function! CloseWindowOrKillBuffer()
|
||
|
if(bufwinnr('%')) > 1
|
||
|
wincmd c
|
||
|
else
|
||
|
bdelete
|
||
|
endif
|
||
|
endfunction
|
||
|
|
||
|
nnoremap <silent> Q :call CloseWindowOrKillBuffer()<CR>
|