Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can we make gvim to only show autocomplete options without completing the word so that we can discard it if the expected completion option is not present?

The completeopt setting only seems to have longest match or complete the first option in the menu. Is there a way to do this?

share|improve this question
up vote 5 down vote accepted

This is a really good question and I would like to know if there's a setting that can be flipped to get what you mention.

A workaround/feature I use instead is hitting CTRL + E whenever you don't find a match you are looking for. This aborts the completion and takes you back to your original state.

share|improve this answer

The longest option is what completes the word automatically. Drop it from your completeopt and you won't have this problem again.

For example:

set competeopt=menu,preview
share|improve this answer

Your Answer


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.