I open a new buffer with :new
and then start editing a file with :e file
, however when I quit with :q
it closes the entire buffer, how can I exit editing a file in a buffer but keep the buffer open so I don't need to open it again to edit another file?
Asked
Active
Viewed 156 times
0

Piglet
- 27,501
- 3
- 20
- 43

James Palmer
- 35
- 4
-
`:e another_file` – Matt Jun 26 '20 at 04:40
-
Aren't misusing `buffer` and `window`? In which case your question would be a close duplicate of these questions: https://stackoverflow.com/questions/4465095/vim-delete-buffer-without-losing-the-split-window – Luc Hermitte Jun 26 '20 at 11:12
2 Answers
0
As per my understanding, I think you may need something like:
use :close
or ctrl-w c
and not :bd
This might resolve the issue

Ryan M
- 18,333
- 31
- 67
- 74

Arun Kumar
- 70
- 8
0
:ene[w]
would open a new empty buffer in the current window.
:e filename
would load filename in that window

Piglet
- 27,501
- 3
- 20
- 43
-
-
then your post is not clear. improve it so we can know what you want to achive – Piglet Jun 27 '20 at 06:29