Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am so used to using D to "delete-next-word" in emacs and xterm, that I automatically hit it in Terminal all the time, which rather annoyingly (to me, at least) causes the pane to split instead. I've tried to google solutions, but all I get are hits telling me what a neat feature this is.

I could just use XTerm under X11, but Terminal plays more nicely with some of my favorite Mac utilities (notably Divvy). I've tried iTerm2, but at best I can get it to ignore D, not actually erase the word.

Any ideas?

share|improve this question

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 keyboard 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 code"
  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

share|improve this answer

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 NSUserKeyEquivalents -dict-add "Split Pane" nul
share|improve this answer
Hmm, this disables the shortcut for split pane, but it doesn't seem to delete the word – Nathan Greenstein Oct 23 '11 at 15:16

You can get 'meta-' in terminal using either 'escape' as a prefix, or using opt/alt as a shift key. I've not been able to find a way to use the command key, and none of my searches have turned up anything (with the exception of installing a key mapper); just the same complaint.

share|improve this answer
Install a key mapper to swap Option and Command in Terminal, then enable "Use Option as meta key". – Chris Page Oct 24 '11 at 18:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.