You know how we use the Scrivener spellchecker? And when Scrivener can’t match a word, we have the option of adding that word to the dictionary so Scrivener doesn’t bug us again?
I want to do the opposite. I want to maintain a list of words, and even if a word happens to be in «whatever dictionary Scrivener is using», if it is also on my list, I want Scrivener to flag it up as a typo. A blacklist.
I then want the option of changing the word or leaving it, just as the program works today.
I can do this in Microsoft Word, although it takes a bit of behind-the-scenes hacking. Can I do it in Scrivener?
You could “hack” your substitutions list.
Either the global one, or the auto-complete (per project) to pop-up and (on confirm - enter) add your flag. (If you ignore the auto-complete box and just keep typing it’ll disappear and no change will occur.)
. . . . . . . . . .
I used a red flag emoji, but you could have either function simply append a small diacritic character that will make the word misspelled. You’d get the red squiggle.
The spelling dictionaries are in Hunspell format, and are available in a fashion you could modify, within the installation. We provide instructions for installing your own dictionaries, in fact. While I’ve never tried it, I would imagine that editing the .dic file to remove any words you do not want, would be fairly simple. I think the only trick is to fix the first line to list how many lines are in the file, minus the first line.
Naturally, you would want to zip the original and set the .zip aside so you can restore the list.
Since you’re at it though, you might as well fetch a more recent/expanded copy of whatever dictionary you’re modifying. The LibreOffice link on that page is probably the best one.
Thanks Amber, that worked. It’s not ideal to have to modify the dictionary for the entire language, but it worked.
Can I suggest that introducing a blacklist might be a good idea for Scrivener in the future? Just so that files like “en-us.dic” never ever need to be modified by the user?
Dunno. Maybe it’s only me that wants this? But don’t we all try to avoid using certain words in our writing? Or at least, to be very deliberate about when we use them?
Thanks, Vincent. It raises various ideas about how we can use substitutions. For example, when Scrivener sees a bogey word, substitute “aaaaa” (or anything that’s not a recognised word). You know, just to force the spellchecker to flag it.
In the end, though, I used Amber’s suggestion of modifying the dictionary for the entire language. Risky but powerful. There were only about a dozen words I removed, words like “say”, “said” etc. Words were there’s almost always a better choice.
I cannot think of a way of doing adding such a feature. The spell check engine uses only these two files, the .dic which is a word list, and the .aff which is a special language rules syntax file. There isn’t a third file type which would essentially say, ignore some of the words I put into .dic. A curator simply wouldn’t add those words if they are not supposed to be the dictionary.
Or in other words, these data files are designed for maintainers, not users, really.
But don’t we all try to avoid using certain words in our writing? Or at least, to be very deliberate about when we use them?
I would submit there are far better ways of doing that in particular, than mucking around with the spell check dictionaries. Unlike Word, this is a program for writers. What was the only workaround you had back then needn’t be carried over into a program that can dynamically highlight words for any particular reason—such as not wanting to overuse them. With this method you can tweak the hot-word list as you go, rather than having to shut down, pull out plain-text editors and edit buried files in the installer, reload… Just open the search field and type in the new word to avoid!
But if you wish to use this method, it needn’t be thought of as risky, in my opinion. Just keep the original zipped and in a safe spot, and you can easily restore the vanilla settings. Worst case you can delete the modified folder and then use the UI to download it off our servers again.
I don’t know what that is reaction to, but I would hardly consider any of the above a waste, otherwise I wouldn’t have written as much as I did. Now there is a thread for people who are indeed looking for something like this, with three different methods (including the substitution idea) shown for how they could do so. It is a benefit to potentially many, and that is never a waste.
Just another thought. Rather than retaining only the modified version of the dictionary, after the original is zipped and saved elsewhere, you could instead make a clone of the folder and then modify it. Rename the new folder, and its file contents, to a completely different language name, but a valid language. The new cloned folder, with its modified word list, will now show up as an additional selectable dictionary , while still retaining the original dictionary. Either dictionary can be switched to as needed.
For example, if only English dictionaries are used, clone the relevant folder and rename to, say, Zulu, knowing it’s used here only as the blacklist version dictionary for English words. The name format for folder, and contained files, must follow the convention per the link from Amber. Under the dictionary selection, within Options, both are listed and can switch back to the full non-blacklisted version.
Of course, it is not a true Zulu dictionary, but only you know its true purpose.
Here Zulu-zu-za is a clone of one of the English folders and renamed.