Vim: Delete buffer without losing the split window

前端 未结 8 871
后悔当初
后悔当初 2020-12-07 07:55

When a buffer gets deleted (the \"bd[elete]\" command), it not only deletes the buffer but also removes the split window that buffer was in.

Is there a way to delete

8条回答
  •  旧巷少年郎
    2020-12-07 08:24

    You can add the following to your .vimrc to have Bd work as bd but without touching the window splits:

    command Bd bp\|bd \#

    I found this as a useful complement to what Mud answered.

提交回复
热议问题