If you want to edit another buffer in the window, just use :edit
/ :buf
. The current buffer will be replaced, and remains in the buffer list (i.e. it shows up in :ls
).
If you want to close the windows split, use :close
. The :quit
command will work, too, but has the side effect of closing Vim when this is the last window.
In order to leave buffers that have changes, you need
:set hidden
If you know how Vim deals with buffers, this is a recommended option that many users have set.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…