15

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.

1

2 Answers 2

26

Add this to your .vimrc:

set wildmenu
set wildmode=list:longest
1
  • 4
    I just signed up to superuser and answered questions so that I could get enough reputation to upvote your answer. Thankyou.
    – user138727
    Commented Jun 7, 2012 at 16:11
-4

Pressing Tab multiple times steps through the matches.

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

1
  • 3
    I know ... that's not the question
    – hasen
    Commented Sep 13, 2009 at 5:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .