Any way to make Cmd-D "delete next word" rather than "split-pane" in Terminal

Switch to iTerm2. It's free and sooo much nicer than plain old terminal. Also it has a lot more options for customization, like keyboard shortcuts.

Also I love that you can use cmd and 1-9 to switch between tabs. Try it and you will never go back to regular terminal :)

How to set up delete next word in iTerm 2

  1. Install iTerm2
  2. Launch and then go to preference pane.
  3. Choose the "Keys" tab

  4. Click on the plus button to add a new keyboard shortcut

  5. In the first box type CMD+D
  6. In the second box choose "Send Escape Sequence"
  7. In the third box type the letter d

Voila! Now in iTerm2 cmd+d will delete the word in front of the cursor.

See also https://stackoverflow.com/questions/81272/is-there-any-way-in-the-os-x-terminal-to-move-the-cursor-word-by-word/8250989#8250989


I don't know how to bind D to M-d, but this would remove the shortcut of the Split Pane menu bar item:

defaults write com.apple.Terminal NSUserKeyEquivalents -dict-add "Split Pane" nul