In my ~/.vim/spell/en.utf-8.add file, I've been adding fake language regions (like en_0l) to account for my various interests without muddying them across spaces. Atop this file, I have a line like /regions=us0l0t so I can map region 2 to words from other languages (like food terms) and region 3 to technobabble (the region codes don't really matter). Yes, this gives me "Warning: region 0f not supported" but works fine anyway, with one exception:

Some of my entries do not work.

char siu/2
cochinita pibil/2
double entendre/2

In this example, only "cochinita pibil" and "pozole" work properly. Vim properly reports they're from another region when I :mkspell! % and then re-open the file. However, it says "siu" and "entendre" are misspelled. This is presumably an artifact from "char" and "double" being valid words, but this only affects when there is a specified fake region; adding an entry simply for char siu (across all regions) works just fine, as does adding it to my "real" region (en_us) with char siu/1.

Is there a better way to do what I'm trying to do? Maybe there's a way to "register" my fake regions?

(For the curious: Char siu is barbecued pork, cochinita pibil is pulled pork, and pozole is a hominy & meat stew.)

  • Out of curiosity: why not do what :help 'spellfile' suggests and use several spellfiles? One for food, one for tech, etc.
    – Friedrich
    Commented May 10 at 16:44
  • @Friedrich – I'm trying to take advantage of SpellLocal highlighting. I'm under the impression adding another spellfile would simply inform SpellBad rather than hinting that the word is correct but not in the selected region(s).
    – Adam Katz
    Commented May 10 at 20:35


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.