If I ssh into a Linux box I can move back a word in the CLI using OptionBackspace.
Is there a way I can do this in the Mac's Terminal? Every time I press OptionBackspace, [D
returns.
If I ssh into a Linux box I can move back a word in the CLI using OptionBackspace.
Is there a way I can do this in the Mac's Terminal? Every time I press OptionBackspace, [D
returns.
In your Terminal's preferences, set the following keyboard mapping if it's not already set:
Your Option cursor left should map to \033b
, and Option cursor right to \033f
. Now, pressing Option← and Option→ will move back or forward a word, like they do in normal text editing windows.
If you additionally tick Use option as meta key, pressing OptionB and OptionF will have the same effect, since these are the standard shell bindings for word movement.
Of course, if you really want Option⌫ to move back a word (and not delete it), then map this combination to \033b
instead.