1

I'm trying to create a list of 'rare' words as a supplementary spellfile so

  • I have created list.utf-8.add and used mkspell! to create list.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 with SpellBad
  • 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
1

Coming back to this problem after a long hiatus.

The solution is to switch from "word list" format to Myspell format, and define '_' as a mid-word character by putting the line

MIDWORD _

in the .aff file, along with

RARE ?

to specify that (for example) '?' will be used to flag "rare" words in the .dic file.

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.