14

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.

25

Add this to your .vimrc:

set wildmenu
set wildmode=list:longest
  • 4
    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
-4

Pressing Tab multiple times steps through the matches.

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

  • 3
    I know ... that's not the question – hasen Sep 13 '09 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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