How to Stop Google Docs from Automatically Replacing Double Hyphens

The Dashed Hopes

Google Docs strives to make documents look professionally typeset. One of the automatic formatting rules it employs involves hyphens. If you type two standard hyphens in a row (–) followed by a space or a word, Google Docs will immediately combine them into a single, long “em dash” (—). While an em dash is grammatically correct for indicating a break in thought within a novel or an essay, it is absolutely disastrous if you are writing technical documentation, software code snippets, or command-line arguments, where the double hyphen is a strictly required syntax element.

Preserving Your Hyphens

To maintain the exact characters you type and stop Google Docs from automatically replacing your double hyphens with a long em dash, you must disable the specific text substitution rule.

Open your Google Doc. Look at the primary menu bar across the top of the window and click on Tools. From the dropdown menu, select Preferences. A settings dialogue box will appear in the center of your screen. Click on the Substitutions tab at the top of this box. You will see a long list of automatic replacements (like changing (c) to a copyright symbol). Scroll down this list until you find the specific entry where two hyphens (–) in the left column are set to be replaced by an em dash (—) in the right column. Look to the far left of that specific row and click the checkbox to completely uncheck it. Once unchecked, click the blue OK button to save the changes. From now on, your double hyphens will remain exactly as typed.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.