13

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?

2 Answers 2

13

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.

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

is what you are looking for.

4
  • 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. Aug 5, 2013 at 9:59
  • 1
    A dictionary file can be a simple word list. Aug 5, 2013 at 10:16
  • @n.m. So like a csv? Just words separated by commas? Oct 30, 2016 at 15:08
  • 1
    @Zelphir by newlines IIRC Oct 30, 2016 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.