Jack Eidsness wrote:
My question is easiest to describe in terms of bash.

When you're using a plain bash configuration (plain, or maybe its common configuration for most linux distros), and try to open a file at the command line using tab for autocompletion, like this:

[ /etc ]$ vim rc.(tab)
rc.d        rc.local    rc.sysinit

You get a list of options - nothing is completed, so I would get to type d, l, or s, then hit tab again to get a tab completion.

In vim, suppose I'm in the same directory and I try to open a file

:sp rc.(tab)
Immediately gives me
:sp rc.d/

For example, supposing I want to edit rc.sysinit, I'd then have to hit tab until I saw it appear (twice, in this case, but normally, I wouldn't know that until I see it), or backspace twice and then an s, then tab.

Is there way to make vim autocomplete like bash instead of like this?

-Jack


see ":help wildmode"

To complete the longest common match (as it does in bash on my system)

        :set wildmode=longest

To complete nothing if there are more than one match, but start a menu on the statusline

        :set wildmenu wildmode=list

etc.


Best regards,
Tony.
--
But the greatest Electrical Pioneer of them all was Thomas Edison, who
was a brilliant inventor despite the fact that he had little formal
education and lived in New Jersey.  Edison's first major invention in
1877, was the phonograph, which could soon be found in thousands of
American homes, where it basically sat until 1923, when the record was
invented.  But Edison's greatest achievement came in 1879, when he
invented the electric company.  Edison's design was a brilliant
adaptation of the simple electrical circuit: the electric company sends
electricity through a wire to a customer, then immediately gets the
electricity back through another wire, then (this is the brilliant
part) sends it right back to the customer again.

This means that an electric company can sell a customer the same batch
of electricity thousands of times a day and never get caught, since
very few customers take the time to examine their electricity closely.
In fact the last year any new electricity was generated in the United
States was 1937; the electric companies have been merely re-selling it
ever since, which is why they have so much free time to apply for rate
increases.
                -- Dave Barry, "What is Electricity?"

Reply via email to