Search code examples
vimspell-checking

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.


Solution

  • 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