TipBITS: Bring macOS Text Replacements Back to Life

Originally published at: TipBITS: Bring macOS Text Replacements Back to Life - TidBITS

Although TextExpander is an excellent choice for those who require numerous text replacements, especially complex ones, Apple’s built-in text replacement system is all that many people need for a handful of replacements. It also syncs across all your devices using iCloud Drive, allowing you to use the same expansions on your iPhone, iPad, and Mac.

I regularly use eml and ace@ to expand to my email address—the former is easier to type on the iPhone without switching keyboards, while the latter catches my fast reflex typing on the Mac. Similarly, 607- expands to my phone number and 50hick to my postal address. Although I prefer using Control-period to invoke a Keyboard Maestro macro to type “cheers… -Adam” on my Mac, the sig and Sig (to manage automatic capitalization) text replacements take over that task on the iPhone. I’ve also started using Slack-style replacements like expanding :roll to 🙄 for the several emoji I employ regularly.

You can imagine my frustration when those text replacements fail to work in a specific Mac app, as happened recently. Since they expanded properly in nearly all apps, it took me some time to realize they weren’t working in one app and even longer to stop typing the expansion manually and start troubleshooting. Once I finally did, everything looked correct in System Settings > Keyboard > Text Replacements—there is no exclusion list—and I was able to eliminate Keyboard Maestro from the equation.

The solution turned out to be remarkably simple. However, the fact that it took me more than a few minutes to discover suggests that others may be equally forgetful. I hadn’t recalled that every app that supports text replacements should have an Edit > Substitutions > Text Replacements menu item. Like other toggle menu items in macOS, it switches between checked (active) and unchecked (inactive) states. Since toggle items visibly change only with the presence or absence of a checkmark, it’s easy to overlook when this setting has been deactivated. Choose it to add the checkmark, and text replacements will start working again. If text replacements aren’t working despite that menu item being checked, toggling the menu item off and back on might help.

Text Replacements menu option in macOS

How did Edit > Substitutions > Text Replacements get turned off? That’s what I can’t figure out. Since I had forgotten the menu item even existed, there’s no way I could have accidentally turned it off manually. Nor have I found a keyboard shortcut that would toggle it after an accidental keypress. Others have experienced this, too, and even though several have suggested that toggling the option in Notes caused it to start working in other apps, I couldn’t reproduce any connection between Notes and any other apps. It remains a mystery, but one with a trivially easy fix.

12 Likes

Doh! That explains why my text replacements never worked in Apple Mail! :man_facepalming:t3:

I turned that on and now I can type common emojis like on iOS. :smile:

I always assumed it was associated with the default font I used for emails, since that causes other problems (it’s fixed width and doesn’t have bold or italic, for instance, so those text attributes are disabled).

Like Adam, I never knew about this so I never turned it off. Maybe it was disabled by default at some point?

2 Likes

This literally solved a problem I was just having. Thanks, TipBITS!

3 Likes

Oh, my goodness. I would not have considered this. Thanks, Adam!

3 Likes

I am so pleased to hear that (a) I’m not alone and (b) this is sufficiently subtle that clever people here have also suffered from it.

I swear there’s some sort of cosmic ray bit flipping that turns it off. The app that first triggered me to write this article was Mimestream, and while I was writing in Lex, I noticed that my expansions weren’t working there either. Yep, it had somehow gotten turned off in Arc, too.

I wonder if there’s any sort of .plist spelunking that could identify apps where it’s turned off?

3 Likes

It’s annoying that Microsoft Word has its own Text Replacement function and doesn’t at least allow one to use Mac OS system ones in addition. If anyone has a workaround, I’d be happy to hear it. I don’t want to have to recreate all of my Text Replacement entries in Word’s Auto Correct Options feature.

1 Like

I have been annoyed for a long time that Mail ignored my text replacements. Thank you, Adam!

1 Like

Interesting. MS Word does replace/expand what I type in comments. But not in the main text. Using Office 365.

Whoa, that’s a trip! The same thing happens to me — system replacements work in comments but not the main document text.

Text replacements suddenly being turned off sounds a bit like when my Develop menu disappeared after updating to Safari 18.3, and I couldn’t find the old “show Develop menu” setting anywhere. It turned out that toggling the “Show features for web developers” setting brought the menu back.

2 Likes

I would assume that Microsoft Word’s main editor is not using an Apple text widget, so any support for text replacements would have to be handled explicitly by Word - not something you’ll get for free.

Word has its own system of text replacements. It would be nice if system-replacements get auto-added to the set, but maybe there are technical reasons why they don’t want to do that. Or maybe it’s just something they never thought of.

So helpful — thank you, Adam.

Discovering the Substitutions menu let me realize that I can turn off the smart links that mysteriously appear when I paste in a URL in some apps.

1 Like

On a similar note, wish I could turn off Sonoma’s apparently system wide word suggestions forever. I’ve always hated those. I’m so tired of the system replacing “No” with “NO” in my text data spreadsheets forcing me to add a space to prevent the capitalization.

You can turn this off in System Settings. Go to Keyboard ➞ Text Input ➞ Input Sources ➞ Edit… and you can turn off options such as Correct spelling automatically and Capitalise words automatically.

1 Like

Tried that before. Didn’t work. Thanks though. I tried it again just to be sure.

John

1 Like

Over many years I have noticed to my chagrin that sometimes macOS updates make changes to System Settings, such as resetting some to default settings, etc. without notifying the user. I am not saying that this is the case, but it is a possibility.

I suspect it is because I don’t use official Apple or Microsoft apps because I am not interested in their use of the cloud at all. I decided to test it on Pages and Numbers and it appears to work on them. (I did pay for the sort of Shareware/OpenSource app I use.)

John

Wow, this is a High Ranking Tip! Thanks!

Thanks Adam!

Unfortunately, not every app that supports text replacements has an Edit > Substitutions > Text Replacement menu item. For instance, text replacements stopped for me in Filemaker (which doesn’t seem to have such an option). Similarly, it stopped working in Safari which did have text replacements activated. Confusingly, replacements still worked in Mail, although I hadn’t changed anything.

The solution turned out to be simple, as usual: just restart. That fixed it for me in both Filemaker and Safari.

3 Likes

Great idea, but it didn’t work for me in Safari. Some Safari pages have the Edit/Substitutions menu grayed out so that I cannot change it, but some of them show it; I don’t understand the different presentations. Selecting the Text Replacement option, when possible, still doesn’t permit text replacements that have been set up in System Settings. And Notes’ Edit/Substitutions menu is also grayed out.