I'm trying to create a list of 'rare' words as a supplementary spellfile so
I have created
list.utf-8.add
and usedmkspell!
to createlist.utf-8.add.spl
I included
list.utf-8.add
in my spellfile setting
If I append /!
to every word to mark it as 'bad', the highlighting works as expected (every word is highlighted per SpellBad
.)
However, if I append /?
instead to every word to mark it as 'rare', the words are not highlighted at all. I verified that SpellRare
is correctly configured.
What am I missing?
===
Adding more information:
What I am trying to do is use my tags file to create a spellfile that will highlight identifiers and such in comments as 'rare' words. Since these are identifiers and not natural language words, they have 'unusual' characteristics, such as embedded underscores.
After further experimentation, I have found that a few identifiers from the list do get highlighted with SpellRare
, but most don't get highlighted at all and others have parts highlighted as SpellBad
.
In detail:
- If the words in the list are marked as 'valid' (i.e., no flags), then the spell check considers them valid and they are not highlighted
- If the words in the list are marked as 'bad' (i.e.,
/!
flag), then the spell check considers them bad and they are highlighted withSpellBad
- If the words in the list are marked as 'rare' (i.e,
/?
flag), then "it depends"- If the first part of the word up to a '_' is not a valid natural language word then the whole word is marked as 'rare' and highlighted with
SpellRare
- Otherwise, each part of the word (delimited by '_') is considered valid or not on its own depending on whether it is a valid natural language word or not, and highlighted accordingly
- If the first part of the word up to a '_' is not a valid natural language word then the whole word is marked as 'rare' and highlighted with