mirror of
https://oauth2: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@github.com/m1ngsama/chopsticks.git
synced 2026-06-26 05:44:38 +08:00
18 lines
438 B
VimL
18 lines
438 B
VimL
" buffers.vim — buffer commands
|
|
|
|
command! Bclose call <SID>BufcloseCloseIt()
|
|
function! <SID>BufcloseCloseIt()
|
|
let l:currentBufNum = bufnr("%")
|
|
let l:alternateBufNum = bufnr("#")
|
|
if buflisted(l:alternateBufNum)
|
|
buffer #
|
|
else
|
|
bnext
|
|
endif
|
|
if bufnr("%") == l:currentBufNum
|
|
new
|
|
endif
|
|
if buflisted(l:currentBufNum)
|
|
execute("bdelete! " . l:currentBufNum)
|
|
endif
|
|
endfunction
|