Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

2 Answers 2

up vote 7 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

 
discard

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.