Vim: Close All Buffers But This One

前端 未结 13 2230
别那么骄傲
别那么骄傲 2020-12-22 15:04

How can I close all buffers in Vim except the one I am currently editing?

13条回答
  •  礼貌的吻别
    2020-12-22 15:35

    I like 1,100bd (suggested by juananruiz) which seems to work for me.

    I added a quit! to my mapping to give me

    nnoremap bd :1,100bd
    nnoremap bdq :1,100bd:q!
    

    This kills all the buffers and shuts down Vim, which is what I was looking for mostly.

提交回复
热议问题