1
Tonni 2014-12-22 21:34:53 +08:00 1
:qall!
|
5
ensonmj 2014-12-22 22:36:34 +08:00
:only
|
6
river1007 2014-12-23 14:28:17 +08:00
关闭所有buffer,除了当前编辑的buffer
function! DeleteAllBuffersInWindow() let s:curWinNr = winnr() if winbufnr(s:curWinNr) == 1 ret endif let s:curBufNr = bufnr("%") exe "bn" let s:nextBufNr = bufnr("%") while s:nextBufNr != s:curBufNr exe "bn" exe "bdel ".s:nextBufNr let s:nextBufNr = bufnr("%") endwhile endfun noremap <leader>dab :call DeleteAllBuffersInWindow()<CR> |
7
qiqiboy 2017-09-15 11:06:06 +08:00
au bufenter * if 0 == len(filter(range(1, winnr('$')), 'empty(getbufvar(winbufnr(v:val), "&bt"))')) | qa! | endif
|
8
Lenic 2020-08-07 13:33:15 +08:00
" 关闭全部 Buffer 但保留当前窗口
command CloseAllBuffers :bp | bd nnoremap <Leader>fq :CloseAllBuffers<CR> |
9
Lenic 2020-08-07 18:24:40 +08:00
" 关闭全部 Buffer 但保留当前窗口
command CloseAllBuffers :bd % nnoremap <Leader>fq :CloseAllBuffers<CR> |