tags:

views:

133

answers:

1

When getting spelling suggestions in gvim (z= on a word) the list of suggestions is created rather slowly, I can actually see it scroll up one line at time.

When using vim in a terminal the full list seems to be generated instantly and there is no visible scrolling like in gvim.

I've tried setting ttyfast, but it has no visible effect in either gvim or vim (gvim scrolls whether it's set or not, vim never scrolls whether it's set or not).

Is it possible to get gvim to produce spelling suggestions more quickly and get rid of the scrolling effect?

A: 

Have a look at the 'spellsuggest' option. This has a few settings that may speed things up for you, such as 'fast' (which may be less accurate) or {number}, which limits the number of matches. If you have a large (e.g. maximised) window, you may find that it's searching for a long time. With {number}, it'll limit the matches and speed up the display.

" Look for best result, but limit results to 10 matches
:set spellsuggest=best,10
" Go for speed (at the expense of accuracy) and limit to 20 matches
:set spellsuggest=fast,20

Put whichever you choose in your vimrc. For more information, see:

:help 'spellsuggest'

To see your current setting, see:

:set spellsuggest?
Al
It's just that it's not the *creation* of suggestions that is slow ('spellsuggest' is set to the same in both tty and gui mode). It's literally the *displaying* of the suggestions that is very much slower in gui mode.
Magnus
@Magnus: That's why I suggested limiting the number of matches: if I have a maximised GUI window, it takes a long time to show the matches (despite having the same spellsuggest setting in GUI and tty), but if I `set spellsuggest=best,10` it's much quicker. Because the command line version has a smaller window, the number of matches is smaller. Unfortunately, I have no other suggestions though.
Al
This is, regrettably, the best solution I've found. It doesn't address the slow scrolling, instead it limits the number of lines to scroll.Ideally I would have liked an option that turned off scrolling, just popping up all suggestions at once seems so much better.Anyway, I'm marking this as my accepted answer.
Magnus