1

I have set my thesaurus file to

first, second, third
one, two, three
fibonacci, gauss, euler
firstly, lastly

Now if I type a word "first" and use ctrl-x ctrl-t, vim expands autocomplete menu with words both from the first and fourth line, namely

first, second, third, firstly, lastly

because it also autocompletes first to firstly, and includes the whole line containing it. Which is not what I wanted, because the fourth line has nothing to do with the first line, and to autocomplete to a word I would use a different autocomplete option, like ctrl-x ctrl-k.

How do i make vim autocomplete with just the words in the line with the word I typed?

  • `first` is part of `first` and `firstly` so both lines are equally valid completion candidates. – romainl Apr 08 '22 at 18:22
  • @romainl Thats the point. I don't want it to complete the word to a word it is a prefix of. Other autofilling commands handle it better. How do I tell it not to look for words that it is part of? – Don'tDownVote Apr 08 '22 at 18:24
  • AFAIK, `:help 'completeopt'` is the only relevant option and I don't think it will help. – romainl Apr 08 '22 at 20:05

0 Answers0