I’m not sure whether that’s new (I think other shortcuts for moving from word to word were also already commented on around here) but when I fire up Terminal in Lion I can move from word to word by pressing Option-Arrow-left or Option-Arrow-right.
Some other comments indicated "esc/b" and "esc/f", and those seem to work, but are horribly unintuitive and difficult to type. Will need to map them. I've lived X years without that ability, so another few minutes won't hurt :)
thx
stty -icanon -echo; od -c
Hit your key sequence then hit return a bunch of times until the line comes out. You'll see some sort of ESC sequence.When done, control-c then type "stty sane" (it will not echo).
For iTerm I get "\e[1;9D". Terminal, interestingly is giving me "\e\eD". When I turn off my "Use option as meta key" preference in Terminal it gives me "\eD". Which is the same as plain left arrow.
Also, neither of those escape sequences does anything in bash for me.
I typically use iterm2 now, and I mapped option/left and option/right to ESC-b and ESC-f, and all is well for me. Hope that helps someone else.
hrm... well "alt" is above the 'option' label, so I'm not sure how to invoke that. option arrows don't move by word. fn+option (which I'd assume give me 'alt' mode) doesn't work. What's the magic invocation to make that happen? Or is it Lion only? (snow leopard here).