I've recently immigrated from Ubuntu to Mac OSX Snow Leopard. I use the terminal (iterm2) extensively, and I am a great fan of shortcut keys.
The standard shortcut keys (which work in any GUI textbox) are:
- ⌘+← Jumps to first character in line
- ⌘+→ Jumps to last character in line
- ⌥+← Moves one word forward
- ⌥+→ Moves one word backward
How can I impose these shortcuts in iterm (or terminal)?
Are there any standard key bindings for these operations in Mac I should know and use?
Best Answer
The standard shell shortcuts (
M-
= meta = option or esc,C-
= control):M-b
andM-f
correspond to ⌥← and ⌥→C-a
andC-e
correspond to ⌘← and ⌘→⌥← and ⌥→ are bound to
M-b
andM-f
by default on Lion's Terminal. On 10.6 you'll have to add them manually:I haven't found any way to reassign ⌘← and ⌘→ in Terminal.