Zet - How do I spell check in vim?

How do I spell check in vim?

Enable spell check:

:set spell

Set language to British English:

:set spelllang=en_gb

This will flag non-British spellings, e.g., “color” vs. “colour”.

Navigating & Fixing Misspellings:

Move to next misspelled word:

]s

Move to previous misspelled word:

[s

Get suggestions for a misspelled word (when cursor is on it):

z=

Then, select a replacement from the list.

Mark a word as correct (to add it to your personal dictionary):

zg

Useful for custom or technical terms.

Customisation:

Underline misspelled words instead of highlighting:

highlight SpellBad cterm=underline gui=underline

#vim #spellcheck