acorello
acorello

Reputation: 4653

Vim in ex-command mode, how to complete the path only up to the first non unique match?

I'm in a directory with many subfolders with a common prefix:

./pref-apple
./pref-aubergine
./pref-mango
./pref-milk

I have a file in one of these folder and I want vim to auto-complete the path just up to the first non-ambiguous match

:e ./p<TAB> -> :e ./pref-

:e ./pref-au<TAB> -> :e ./pref-aubergine/

while at the moment it will auto-complete with the full first folder-name. :e ./p<TAB> -> :e/pref-apple/

How can I do that?

Upvotes: 8

Views: 3087

Answers (1)

intuited
intuited

Reputation: 24084

You want to set wildmode=longest.

More info at :help 'wildmode'

Upvotes: 14

Related Questions