everyday mac tools

Turn off autocorrect, smart quotes and substitutions for writing and code

· 5 min read

Most of these switches live in one sheet: System Settings, Keyboard, then the Edit button beside Input Sources. Autocorrect, automatic capitalization, the double-space period and smart quotes and dashes are all there, and they apply system wide. Text replacements are a separate list in the same Keyboard panel, and individual apps keep their own copies that can override everything above.

That last part is why people turn autocorrect off and then watch it happen again in one app.

The system wide switches

  1. Open System Settings and choose Keyboard.
  2. Under Text Input, click Edit beside Input Sources.
  3. In the sheet that appears, look at the section that applies to all input sources.

The switches that matter:

  • Correct spelling automatically. This is autocorrect. Off means misspellings still get underlined, they just stop being rewritten under your hands.
  • Capitalize words automatically. The one that turns git into Git and iphone into IPhone.
  • Add period with double-space. Harmless in prose, unhelpful in anything with numbers or code.
  • Use smart quotes and dashes. Turns straight quotes into curly ones and a double hyphen into a dash.
  • Show inline predictive text, on recent versions of macOS. Grey suggested text that completes your sentence; Escape dismisses one, and the switch stops them appearing at all.

There is also a Spelling popup in the same sheet. Set it to a specific language rather than Automatic by Language if you write in two languages and macOS keeps guessing the wrong one mid-paragraph.

Close the sheet and the changes take effect for apps you launch afterwards. Apps already running usually pick them up too, but if one does not, quit and reopen it.

Text replacements are a separate list

Back in System Settings, Keyboard, Text Input, there is a Text Replacements button. That opens the list of shortcuts that expand into longer text: the built-in omw entry is the one people meet first, usually by typing it into a code comment.

Select an entry and click the minus button to remove it. Emptying the list is different from turning replacements off, because replacements can still be switched per app in the Edit menu described below.

This list syncs through iCloud, so an entry you delete on the Mac disappears from your iPhone and iPad as well. That is usually what you want. It is worth knowing before you clear out entries someone else in a shared family setup relies on.

Why one app ignores all of it

Any app built on the standard macOS text system has its own copy of these settings in its Edit menu:

  • Edit, Substitutions: Smart Quotes, Smart Dashes, Smart Links, Text Replacement, Smart Copy/Paste.
  • Edit, Spelling and Grammar: Check Spelling While Typing, Check Grammar With Spelling, Correct Spelling Automatically.

The moment you toggle one of those in an app, that app stores its own value and stops following the system setting. So an app where somebody once turned smart quotes on keeps them on forever, no matter what System Settings says. Fix it in that app’s Edit menu, not in System Settings.

A few Apple apps put the same controls somewhere else as well. TextEdit has them under TextEdit, Settings, New Document, where they apply to documents you create from then on rather than to the one already open. Mail’s spelling choice is in Mail, Settings, Composing. Pages and Keynote have an Auto-Correction tab in their own settings.

The case that actually bites: code

Smart quotes do not appear in Terminal or in most code editors, because those use their own text engines rather than the system one. The damage happens upstream. You write a command in Notes, a message or an email, paste it into Terminal, and it fails with a syntax error that makes no sense, because the straight quotes became curly ones and --force became a single dash.

The tell is that the command looks right and refuses to run. Paste it into a plain text editor, or run cat -A style inspection if you like, and you will see characters that are not the ones you typed.

Two habits remove the problem for good: turn off smart quotes and dashes system wide, and paste shared commands into a plain text document before sending them on. When you are given a command that will not run, retyping the quotes by hand is faster than hunting for the character.

The Terminal version, and putting it back

Every one of these is a preference key, which is useful when you set up a Mac more than once:

defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticTextCompletionEnabled -bool false

Log out and back in, or quit and reopen the apps you care about, since each reads these at launch. To undo one, use defaults delete with the same key rather than writing true, so the setting goes back to being whatever macOS decides rather than something you pinned. What defaults write does covers reading a value before you change it and getting back out cleanly.

Remember the per-app override. If an app still substitutes after this, the same key exists in that app’s own domain and is winning.

If you would rather not use Terminal

Mainspring has autocorrect and smart quotes among its power-ups, in a Writer’s Focus bundle with the other settings people change when they are trying to get words out. Each one records the previous value before it changes anything, so it flips back in a click. It is $29 once for up to three Macs, with a free day to try it, which is a real cost for settings that are also free to change by hand. What you get for it is not having to remember which key was which.

Questions

Autocorrect keeps changing a name I use. Can I teach it instead? Yes. Right-click the word where it is underlined and choose Learn Spelling. That adds it to your personal dictionary and stops both the underline and the correction, without turning anything off for everything else.

Will turning off autocorrect turn off spell checking? No. They are separate. With autocorrect off you still get red underlines under misspellings, you just get to decide what happens next. If you want the underlines gone too, turn off Check Spelling While Typing in that app’s Edit, Spelling and Grammar menu.

I turned smart quotes off but one app still curls them. That app has its own stored value from an earlier toggle. Open it, go to Edit, Substitutions, and turn Smart Quotes off there. The system setting only applies to apps that have never had the switch touched locally.

Does any of this change files I have already written? No. Every one of these settings acts as you type. Text already substituted stays as it is, so a document full of curly quotes needs a find and replace if you want them straight.