Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

up vote 12 down vote accepted

Add this to your .vimrc:

set wildmenu
set wildmode=list:longest
share|improve this answer
2  
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
2  
I know ... that's not the question –  hasenj Sep 13 '09 at 5:42

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.