How to stop Mac to convert typing double dash to emdash?

I think it's a Mountain Lion thing, when you type - (dash) twice, it becomes — (emdash). When you type tm, it becomes ™ (trademark symbol). Or when you type three . (dot), it becomes … (elipsis). Some are useful, some are very annoying. Overall, I want to stop that. How can I achieve this?


Solution 1:

(on Sierra 10.12, this is now in the Keyboard control panel)

Go to the system preferences and choose "Language & Text"

enter image description here

In the "Text" tab you will find the list of substitutions.

enter image description here

If you want to stop -- from being turned into (emdash) you need to use the + button and add a new rule to replace -- with -- (replace with itself)

Or, right click in a text field and go to "Substitutions" and disable "Smart Dashes"

Stupid Dashes

Solution 2:

I encountered this same problem on Mavericks (10.9), where the fix has changed slightly. Go to System Preferences, then "Language & Region" then click the "Keyboard Preferences..." button and to go to "Text" tab. It is no longer a substitution, however, but instead on the right-hand side of the window there is a tickbox "Use smart quotes and dashes". Unticking this stops it changing two hyphens into an en-dash.

One little gotcha: on 10.9.5 with TextEdit (and probably others) you must exit then restart your editor to have this change take effect.

Solution 3:

In 11.11 this is under System Preferences > Keyboard. There is a checkbox for Use smart quotes and dashes.

Keyboard pref in 11.11

Solution 4:

In earlier versions of Mac OS X, there were two separate options for smart quotes and smart dashes in the Keyboard System Preferences; however in at least versions 10.9 through 10.11, that option has been replaced by a single "Use smart quotes and dashes" preference.

Fortunately, there are still two separate preferences under the hood, and the UI checkbox toggles both of them simultaneously. You can enable or disable just one of smart quotes or smart dashes from the terminal:

# Disable just smart dashes
defaults write -g NSAutomaticDashSubstitutionEnabled 0

# Disable just smart quotes
defaults write -g NSAutomaticQuoteSubstitutionEnabled 0

# To re-enable, set either back to 1.

This is currently true as of OS X 10.11; this may change in future versions of OS X (or macOS, as it will now be called).