Entering superscript text (exponents) in TextEdit?

You can superscript style any text by highlighting the text and then selecting Format -> Font -> Baseline -> Superscript from the menu in TextEdit.

It's not assigned to a keyboard shortcut by default. To assign it to a keyboard shortcut go to System Preferences -> Keyboard and click on the Keyboard Shortcuts tab. Select Application Shortcuts from the left hand list and press the + button button below the right hand list to add a new application-specific shortcut:

enter image description here

From the menu that pops up select TextEdit as the application (otherwise the shortcut will be made for all applications). For Menu Title enter Format->Font->Baseline->Superscript and for Keyboard Shortcut (assuming OS X 10.8 or higher). Put your cursor in the box and press the combination of keys you want to use for the shortcut (I used Cmd+Shift+= in my screen capture example):

enter image description here

Press Add button to store the shortcut. You might have to restart TextEdit for the shortcut to appear.


Modify the Press & Hold keys

For entering numbers in superscript (exponents), I prefer the Press & Hold method since it works in any app regardless of whether the app supports it (e.g. plain-text editors).

  1. Navigate to System/Library/Input Methods/PressAndHold.app/Contents/Resources/.

  2. Backup the Keyboard-en.plist file.

  3. Append the following to the Keyboard-en.plist file (before the closing </dict></plist>).

    <key>Roman-Accent-t</key>
    <dict>
        <key>Direction</key>
        <string>right</string>
        <key>Keycaps</key>
        <string>t ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁰</string>
        <key>Strings</key>
        <string>t ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁰</string>
    </dict>
    

Feel free to change the Roman-Accent-t to any character you wish, providing it does not already have Press & Hold keys assigned.