What control character do I send to the terminal to make it delete a full word at a time?
Solution 1:
- Select "Preferences..." from the Menu "Terminal"
- go into "Settings" and select your default window configuration, go into the tab "Keyboard"
- 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.
Solution 2:
ctrl+W will delete the previous word.