nkrkv
nkrkv

Reputation: 7098

Preprocessing a word before spell checking in Vim

I use Vim's spell checking to validate texts in Russian. We have letter ё in our alphabet which is often replaced with simple е. So, for example, word ёжик из written as ежик. It is a bad tone actually. Its like using - (hyphen) where — (em-dash) is required, like using "computer" quotes forgetting about existence of „typographic” «quotes», etc.

The bad thing is that spell dictionary for Vim composed out of simplified words with all ёs, replaced with еs. So I always get an error in a word with ё.

So the question, is there any hook I can use that will allow me to normalize a word just before it will be spell checked? Or maybe someone has a better idea? Thanks.

UPDATE

With the hint from @sarnold, I found the solution. One should use ru_yo locale instead of ru_ru if he wants ёёёёё

Upvotes: 1

Views: 456

Answers (2)

sarnold
sarnold

Reputation: 104080

My first thought when reading your post was to suggest using zg to add the word to the spellfile; after a few weeks you'll have a lot of them. Not ideal, but simple.

:help spell-russian lists several different spelling variations, would one of these help?

I also notice in :help spell.txt that there are options for downloading your own spellfiles from OpenOffice or http://www.a-a-p.org to automate building spellfiles.

Upvotes: 2

thegeek
thegeek

Reputation: 2458

I would recommend you to use your own spell checking for vim. Use a method #2 explained here

Upvotes: 0

Related Questions