开发者

How to delete current buffer and reopen the next buffer in current window?

开发者 https://www.devze.com 2023-01-27 08:52 出处:网络
I would like to know is there any shortcuts or commands to switch buffer (delete current开发者_运维百科 and reopen next buffer) in current window because sometimes I feel I opened too many buffers? An

I would like to know is there any shortcuts or commands to switch buffer (delete current开发者_运维百科 and reopen next buffer) in current window because sometimes I feel I opened too many buffers? And currently I use bufexplorer and fuzzyfinder.


Try this:

function DelBufferAndNext()
    let s:old_bufnr = bufnr('%')
    bnext
    exec s:old_bufnr . 'bd'
    unlet s:old_bufnr
endfunction
command -nargs=0 BD call DelBufferAndNext()
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号