Tip 121Use Alternate Spelling Dictionaries

Out of the box, Vim’s spell checker supports regional variations of English. Find out how to specify the region and how to obtain spelling dictionaries for other languages.

When we enable Vim’s spell checker, it compares words against an English dictionary by default. We can change this by tweaking the ‘spelllang’ option (see 'spelllang'). This isn’t a global setting; ‘spelllang’ is always local to the buffer. That means it’s possible to work simultaneously on two or more documents and use a different spell file for each—handy if you’re bilingual.

Specify a Regional Variant of a Language

Vim’s spell file supports several regional variations of English. The default spelllang=en setting will permit ...

Get Practical Vim, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.