In the following screenshot, I demonstrate the following operations that shall yield a "buffer" that cannot be closed. My guess is that the list of files/directories is actually not a buffer. My question is: how to close such a thing? When I use :bnext, such a "buffer" always get in my way.

  1. Open a "directory" by vim ~ (this opened my home directory); ==> I then get the first "buffer" opened, displaying the list of files + directories in my ~ directory;
  2. In the newly opened Vim session, edit (open) .Xauthority file by :e .Xauthority; ==> This brings up another buffer
  3. Then, I close the new buffer with :bd.
  4. Lastly, I tried twice to close the first buffer of all files+directories with :bd. ==> nothings gets closed.

I have been experiencing the problem all Vim installations that I have: on Windows machine as gvim.exe, on Linux machine through the commandline (this recording) and on Linux with gvim GUI sessions.

enter image description here


1 Answer 1


That “buffer” is netrw. It notoriously has this issue, although in practice it’s not a huge deal.

I tend to swap files by name or argument list (:args) more often than cycling through buffers.

In other words, don’t worry about deleting it, and don’t let it bother your workflow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.