Right now, when I do :set spell
in my Vim, I get spelling errors highlighted as if they are selected text. What I want is an MS-Word like underlining of spelling errors. I tried to lookup :help spell
but could not find a clue. Any help is appreciated.
Using SpellcheckingTo move to a misspelled word, use ]s and [s . The ]s command will move the cursor to the next misspelled word, the [s command will move the cursor back through the buffer to previous misspelled words. Just hit Enter if none of the suggestions work, or enter the number for the correct word.
If you want to turn it on, run setlocal spell in the Vim command line (if you want spell check to always be on, add set spell to your . vimrc). After turning spell check on, misspelled words will now be highlighted. To move your cursor to the next misspelled word, enter ]s .
Here's how. Click File > Options > Proofing, clear the Check spelling as you type box, and click OK. To turn spell check back on, repeat the process and select the Check spelling as you type box. To check spelling manually, click Review > Spelling & Grammar.
Spelling errors are highlighted using the SpellBad
highlighting group. To get it highlighted as you want, you should put something like
hi clear SpellBad hi SpellBad cterm=underline " Set style for gVim hi SpellBad gui=undercurl
after the last line that is altering the color scheme in your vimrc (it is either set background=(dark|light)
or colorscheme {schemename}
).
See also :h hl-SpellBad
for names and descriptions of other Spell* highlight groups.
The above needs to be typed everytime you set colorscheme. If you wish to avoid it, you should use autocmd
.
See https://vi.stackexchange.com/questions/18295/how-to-set-a-colorscheme-that-still-shows-spelling-errors
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With