1

If spell checking is on and I type "the the" two times in a row, it marks it as an error. This is described in the docs as Word Combinations. Can I make my own rules like this? How is this done? I imagine zw only works on the word you're on.

2

zw should work just fine. Select the words with Visual mode first. I just verified this myself (Vim 8.0). You can also add them manually by going to the first file you see with set spellfile?. Simply put the words on their own line and append /!, e.g. is bad/!. If they don't appear as a spelling error immediately after zw try doing a screen redraw with CtrlL.

I figured some of this out by doing :h spell and then /the the. That's the example they use whenever discussing multi-word entries. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.