Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

When you type :e some/path/file<Tab> if there are several matches, vim just picks the first one and you have to cycle through the rest of them with the Tab key. (pretty much like the behavior of the Windows CLI).

How do I make it behave like bash where it only completes until there's ambiguity?

EDIT: updated question for a bit more clarity.

share|improve this question
up vote 19 down vote accepted

Add this to your .vimrc:

set wildmenu
set wildmode=list:longest
share|improve this answer
I just signed up to superuser and answered questions so that I could get enough reputation to upvote your answer. Thankyou. – user138727 Jun 7 '12 at 16:11

Pressing Tab multiple times steps through the matches.

You can omit set wildmenu since set wildmode=list:longest implies it.

share|improve this answer
I know ... that's not the question – hasen Sep 13 '09 at 5:42

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.