Search code examples
vimnetrw

Vim - Quit/Close Netrw without selecting any file


My question is fairly simple, still I can't find the answer anywhere : In Vim, how can I close Netrw explorer without actually selecting a file? What keystroke should I hit to close the explorer and go back to the currently opened file?

So far, I have to select the currently opened file from within Netrw if I want to get back to it, which happens to be impossible if I haven't saved it yet.

I may add that I RTFM, and do know the :h netrw command ;)

Many thanks.


Solution

  • 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