How to turn off smart quotes and dashes on a Mac

Stop macOS or a supporting app from converting straight quotes and double hyphens, especially when editing code, commands or configuration files.

Smart quotes and dashes are useful in prose, but typographic punctuation can break code and shell commands. Turn the substitutions off where you edit plain-text instructions.

Check the current app first

In apps that support macOS substitutions, open Edit › Substitutions and inspect Smart Quotes and Smart Dashes. Disable the relevant options for your code or command-writing workflow.

Editors may provide their own settings instead. If the Edit menu has no such entry, consult that editor rather than assuming a macOS checkbox controls everything it types.

Change the system preference if needed

Open System Settings › Keyboard › Text Input › Edit and inspect Use smart quotes and dashes. Changing the default affects supporting apps; it does not guarantee that every website or editor uses the same text engine.

The change also does not repair punctuation already present in a file. Inspect existing quotes and dashes before pasting a command or saving a configuration.

Verify with harmless text

Type straight quotes around a sample word and two hyphens in an empty document. Copy the result into a code editor and inspect it. Appearance alone is unreliable because similar glyphs can represent different characters.

If whole words are being changed as well, see autocorrect controls. For inserting intentional typographic symbols in prose, Character Viewer lets you choose them explicitly.

Source: Apple: replace text and punctuation.

About the author

Rudra Satani makes TapNoise. Spotted a mistake? Email support@tapnoise.com, or reach out at @rudraxx13.

Hear TapNoise on your Mac

Every sound is made by TapNoise itself. Try the sounds on the homepage first, then download the app.