Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim frozen when using spell keyword auto-complete

Tags:

vim

I am using vim's spell dictionary feature, and add these lines to my .vimrc set dictionary=~/.vim/dict/en_US.dic set complete+=k

Then I open vim and input le, then input <ctrl+x> and <ctrl+k>. The auto complete show up correctly. But when I delete le to null, the vim screen is frozen. It seems vim keep scan dictionary and try to show all words in dictionary into the screen. After about 3 minutes, vim will come back and show up a list of words.

screen copy as following: 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

Anyone know how to get rid of this?

like image 691
Leon Avatar asked May 18 '11 14:05

Leon


1 Answers

You can try to hit CTRL C to interrupt the search for suggestion.

It works for most of the long processes freezing Vim.

There is also a spellsuggest option that you can use to limit the size of the suggestion list. Using 10 as a max value might speed up the process at the cost of less results found.

like image 136
Xavier T. Avatar answered Oct 22 '22 13:10

Xavier T.