Vim - Quit/Close Netrw without selecting any file

Use <c-6>/<c-^> to go back to the previous buffer. See :h CTRL-6.

Pro-tip: use :Rex to resume exploring. See :h :Rex


Vim by default, without plugins etc., should treat netrw windows like buffers (without listing it like one (:ls or :buffer). Try:

:bd
:bdelete

or

:bw
:bwipe

Peculiar way Vim did not list the netrw windows as buffer, but close it like one, and went back to former buffer/file.


With v153 of netrw, one may use :Rex to return to the netrw buffer; it will also permit you to return to the file being edited prior to editing a directory. (see http://www.drchip.org/astronaut/vim/index.html#NETRW for the latest netrw).

Tags:

Vim

Netrw