Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been trying to figure out how to exit the file explorer in Vim.

:q works, but it closes Vim as well, not just the file browser.

Am I missing something or is this a bug?

share|improve this question
up vote 10 down vote accepted

The command :bd (delete current buffer) appears to close an active file explorer without closing Vim, even if the explorer is full-screen.

share|improve this answer

This is expected behavior.

If you have an open modified file, :Explore will open a split-screen explorer, and typing :q will return to the opened file. If not, it will open a full-screen explorer, and :q will close vim.

If you want to force the split-screen explorer even when the opened file has not been modified, or if no file has been opened, use :Sexplore instead.

You can also use a tabbed full screen explorer with :Texplore, that probably behaves exactly the way you want. It will open the explorer on a new tab, and typing :q will always close that tab, but not vim.

Please take a look at the Vim documentation about these commands.

share|improve this answer
OK, that makes sense now. Thank you! :) – flyingfisch Jan 20 '13 at 23:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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