How can I close a buffer without closing the window?

前端 未结 16 1002
鱼传尺愫
鱼传尺愫 2020-12-12 13:35

Vim\'s multilayered views (Windows, Buffers and Tabs) left me a little confused. Let\'s say I split the display (:sp) and then select a different buffer to display in each w

16条回答
  •  隐瞒了意图╮
    2020-12-12 14:04

    I don't think there is a one shot way to do this, but you could do :enew or :ls to list your buffers and swap to a different one using :b [number].

    Once you've got a different buffer in the window :bd # will delete the previous buffer in the window, and since the current buffer still exists the window won't be closed.

提交回复
热议问题