I have looked for similar questions but I was quite surprised to not find anything similar... either I am the first person on this planet to have this issue, or I have searched using bad keywords.
Anyway, I use vim's autocomplete function (<C-n>
) a lot to write python scripts. However, in the list of suggested words, there are also words that I previously used in comments, for example:
here, many words suggested by vim (e.g. polymorphism, please, possible, etc.) are part of comments. In this way, the list of suggestions becomes very quickly long and confusing. I would like to remove from the list of suggestions words that were previusly typed in comments, and only keep the other ones. How can I achieve this?
<C-n>
would give you 3 suggestions afterph
, 10 afterpr
, 2 afterpo
, etc. which is a lot more manageable than the potential 26*x suggestions you would get afterp
. Note that starting completion after a few letter is a very common UX pattern for the same reason.