Complete language abbreviation list for vim’s `set spelllang` option

vim

I'm starting using vim's spell check function today. But seems it treat Chinese characters as wrong spell word.

Thus I did a little research, and find I should use set spelllang=X option.

But the thing is, I don't know what's the vim abbreviation for Chinese here. I tried zh and cn, both failed.

I did some searching on google, no result, either.

Does someone know in which file, web-page or help command resides this abbreviation reference list for all languages in spelllang option?

Best Answer

The built-in spellfile.vim script will attempt to download missing spell files from http://ftp.vim.org/vim/runtime/spell.

In general, spell checking is not supported for East Asian languages like Chinese and Japanese, because individual words are not separated by whitespace, so a different algorithm would be needed.

You probably want to

:set spelllang+=cjk

to avoid highlighting those. From :help 'spelllang':

If the name "cjk" is included East Asian characters are excluded from spell checking. This is useful when editing text that also has Asian words.

Related Question