I very recently (2 days ago) solved a problem with Typinator that has some key elements similar to your situation, @zeltak.
Writing AppleScripts using its Objective-C flavour often means endlessly writing out lines that look like:
property NSArray : a reference to the current application's NSArray
Your post inspired me to solve this by creating a list of every single class (e.g. NSArray
) available in Objective-C (of which there are over 12,000, which I filtered down to the 10,720 parent classes that all begin with two capital letters), and then created a single regex text replacement rule in Typinator that allows me simply to type a word followed by a colon and, if that word appears in the file I mentioned, have it expanded into the format above, e.g.:
nsspellchecker:
becomes
property NSSpellChecker : a reference to the current application's NSSpellChecker
It has brought a lot of relief from previous scripting tedium. From this experiment, I have no doubt you can take one of those lists of misspellings and create a single rule in Typinator to cover all 36,000 misspellings, although you would benefit your system a lot if you were able to go through that list manually and eliminate words you are rarely or never going to find yourself typing.
EDIT: In fact, I just went and did it. I downloaded the big 36,000-word long file referenced as "Birkbeck", and reformatted it from:
$wordâ
wordâmisspellingâ
wordâmisspellingâ
$wordâ
wordâmisspellingâ
.
.
into:
$wordâ misspellingâ misspellingâ
$wordâ misspellingâ
.
.
(Here's a copy if you need it: missp.txt.zip [116.7 KB])
Then, I created an Application-specific rule assigned to operate only in TextEdit for purposes of testing:
Regular expression: (matching whole word, case-insensitive)
[^ ]+
Expansion: (plain text)
{/Shell
word=($(grep -E -i '\s$0\b' ~/Desktop/missp.txt))
[[ -n "$word" ]] && printf '%s' "${word#$}" || printf '%s' "$0"
}
Works surprisingly well and speedily. This is just a proof-of-concept with a list I think is far bigger than is necessary, as the words you'll likely need correcting on a day-to-day basis will fit into a list of about 200-300 max.
This missp.txt
list also contains spelling "errors" that can't really be said to be erroneous, but stem fromâI imagineâsome university students submitting papers with "this"
being typed instead of "his"
. At first, I thought my Typinator rule was misbehaving when I went to type "This is a test"
and ended up with the phrase "his I I choose"
. But, upon examination of the file, under the words "his"
, "I"
, and "choose"
, you will, indeed, see alleged misspellings of these words that my Typinator rule was correct in substituting in this nonsense.