At the moment I'm writing a document where I need to use a lot of acronyms, technical language, and non German words.

Now I was wondering if I could create a spelling file (tech_speak) which checks for this technical language so I can use the following vim command

:set spelllang=de,tech_speak spell

How could this be done?


The 'spellfile' option is what you're looking for:

:set spellfile=~/.vim/spell/techspeak.utf-8.add

Note: Avoid special characters like _; as it separates the region name in Vim.

You can then add your custom words to it with zg. You don't even need to add anything to 'spelllang'; those additions will be considered automatically.

  • Yeah this looks good but, when I use zg vim throws "E751: Output file name must not have region name" at me. – Raphael Ahrens Aug 5 '13 at 10:01
  • Ah I needed to remove the _ so :set spellfile=~/.vim/spell/techspeak.utf-8.add works. Thanks! – Raphael Ahrens Aug 5 '13 at 10:03
  • 1
    You're right; it's best to avoid such characters; I've edited my answer. – Ingo Karkat Aug 5 '13 at 10:22
:help spell-mkspell

is what you are looking for.

  • 1
    Please correct me if I'm wrong. But as far as I had read this I need an existing dictionary file. But I want to make a new language file which I can combine with my language. – Raphael Ahrens Aug 5 '13 at 9:59
  • 1
    A dictionary file can be a simple word list. – n. 'pronouns' m. Aug 5 '13 at 10:16
  • @n.m. So like a csv? Just words separated by commas? – Zelphir Kaltstahl Oct 30 '16 at 15:08
  • 1
    @Zelphir by newlines IIRC – n. 'pronouns' m. Oct 30 '16 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.