Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim spell check automatically splits the screen

I typed z= underneath a misspelled word, and vim split the screen horizontally, thereby keeping the misspelled word in context, but also providing a list words to change the misspelled word from. Usually, this latter screen replaces the former screen when I hit z=.

I like this behavior, but can not replicate it. I must have hit something before z= but I do not know what.

like image 231
jmlarson Avatar asked Dec 20 '25 08:12

jmlarson


1 Answers

The behavior you saw accidentally happens when there are only a few suggestions and they don't fill the entire window. You can force a maximum size for the suggestion list (example: 20 suggestions) with

set spellsuggest=best,20

Now, as long as your window exceeds 20 lines, you will see the misspelled word in context, and the bottom 20 lines of your window filled with the suggestion list

like image 107
Scout Avatar answered Dec 22 '25 00:12

Scout