Reputation: 19587
Please, see the screenshot:
After :help some-page
I opened new unnamed buffer by :new
. Now I want to close it (hence bottom window), but when I press ^Wq
(which should close the focused window) it closes vim at all! What's wrong here?
Upvotes: 5
Views: 3815
Reputation: 10260
From :h ^wq
:
Quit current window. When quitting the last window (not counting a help window), exit Vim.
It seems that you're using ^wq
while the bottom window is selected, and that will leave only a help window, thus exiting vim.
Select the help window with ^ww
or similar, and then do ^wq
.
Another alternative is to use :bd[delete]
or :clo[se]
.
Upvotes: 3
Reputation: 24812
Vim quits when you close the [No Name]
buffer because it's the last listed buffer (see :ls
and :ls!
, also :h unlisted-buffers
for more info on unlisted buffers).
You can use :clo[se]
(or ^Wc
), which simply removes the current window (you'll then have the help window in the entire pane).
Upvotes: 3