Vim frozen when using keyword completion

I use the vim spell dictionary function and add these lines to my .vimrc set dictionary = ~ / .vim / dict / en_US.dic set complete + = k

Then I open vim and type le , then type <ctrl+x> and <ctrl+k> . Auto completion is displayed correctly. But when I delete le to null, the vim screen is frozen. It seems that vim is holding a scanning dictionary and trying to show all the words in the dictionary on the screen. After about 3 minutes, vim will return and display a list of words.

follow these steps: open vim and input le, and invoke auto completethen delete all input chars, will get vim screen frozenafter about 3 minutes, vim will come back

Does anyone know how to get rid of this?

+6
source share
1 answer

You can press CTRL C to interrupt the search for offers.

It works for most of the long processes that freeze Vim.

There is also the spellsuggest option, which you can use to limit the size of the offer list. Using 10 as the maximum value can speed up the process due to fewer results found.

+7
source

Source: https://habr.com/ru/post/888430/


All Articles