How do I disable Cmd-D in Terminal?

Cmd-D splits the terminal screen horizontally. How do I disable this "feature"? (Every time I accidentally this key, I have to undo it using Shift-Cmd-D and then re-maximize the window).

This answer offers a command line which does not seem to change anything on OS X 10.11.6 (15G1004). Also, I would like a "permanent solution" - do I add the command to the .bashrc? .profile?

People also recommend iTerm2 - I do not want to install anything, I am quite happy with tmux on top of the regular terminal - except for this stupid problem.

Thanks.


Assign a different key combination to Terminal’s Split Pane menu item:

  1. Quit Terminal
  2. Open System Preferences
  3. Select the panel Keyboard from the second row
  4. Select the tab Shortcuts at top center
  5. Select App Shortcuts from the bottom of the list on the left
  6. Click the + button, bottom center and a smaller panel appears
  7. In the dropdown menu Application:, select Terminal
    1. if Terminal isn’t on the list, scroll all the way to the bottom and select Other… (otherwise, skip to step 8 below)
    2. when a dialog window appears, go to the folder Utilities and select Terminal
  8. In the Menu Title: field, enter the text “Split Pane” without quotation marks, but with capital letters “S” and “P”
  9. In the Keyboard Shortcut: field, enter your custom key combination
    Pro tips:
    1. for a feature you hate, select a key combination you’ll never enter on accident, such as command ⌘control ⌃option ⌥shift ⇧D
    2. select and hold down the modifier keys (that is, command ⌘, control ⌃, option ⌥, and shift ⇧) before you select the letter key (in this example, D)
  10. Click Add
  11. Restart your Mac and fire up Terminal
  12. Become less unhappy 😊

Copy and paste into the terminal:

defaults write com.apple.Terminal NSUserKeyEquivalents '{"Split Pane" = "@~^$d";}'

This is equivalent to the GUI step-by-step instructions in the accepted answer.

Alas, those steps have to be done after every OS update, so a command line approach is a good idea.