Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I recently discovered that sending \033[5D and \033[5C sends the character to move a full word at a time, making mac os x terminal almost as awesome as the default ubuntu and debian terminals.

So then, the one thing I'm missing is: the control key to bind option-delete and option-backspace to deletion of full words.

share|improve this question

2 Answers 2

up vote 2 down vote accepted
  1. Select "Preferences..." from the Menu "Terminal"
  2. go into "Settings" and select your default window configuration, go into the tab "Keyboard"
  3. Have a look at all keybindings, (eg. forward delete is bound to \033[3~ ) and note you can change them by double clicking (thats easier to use than bind in your ~/.bash_profile).

If you choose to use as meta-key, +backspace will work immediately, though this setup might break special characters you can only input by pressing together with them (depending on your keyboard layout). If you don´t use that, you can delete by pressing esc and than backspace.

For forward-deleting a whole word, use either +D or esc and than D.

share|improve this answer

ctrl+W will delete the previous word.

share|improve this answer
    
In the bare terminal, yes, but in emacs, it gets caught and has no effect. –  Alex Feb 14 '11 at 20:38

Your Answer

 
discard

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.