Vim close window without closing buffer

后端 未结 3 1987
遥遥无期
遥遥无期 2021-01-30 13:43

How do I close a window or unsplit without deleting the buffer?

3条回答
  •  失恋的感觉
    2021-01-30 14:12

    Vim windows are closed using :q.

    However, if you don't have another window open, it will exit from Vim. If you do have another window to switch to, only the current window is closed, and buffer remains open. You may need to set hidden.

    To close a buffer, you would need to do :bdelete.

    You can check if your buffer is open or not by using :buffers.

提交回复
热议问题