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.

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

2 Answers 2

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

 
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.