Mac OS X

Disable Smart Dashes in macOS

When I’m writing scripts in an IDE, the smart dashes on the Mac can end up killing me. This is where the — turn into —. To disable this feature:

defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
To turn smart dashes back on:

defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool true