Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

alt+left or alt+right doesn't work for me in Terminal out of the box (I usually use iTerm2 where it doesn't work either) - do you need to change any settings (such as emulation, terminal type etc) to get at that?


Ah, my bad, I must have set that up myself.

According to this[1] stack overflow post, the vim key bindings for move back and forward work by default (which is news to me), or you can set up the alt left and right behaviour by following the instructions here[2].

[1] http://stackoverflow.com/questions/81272/is-there-any-way-in...

[2] http://blog.macromates.com/2006/word-movement-in-terminal/


1) Go to the Terminal menu > Settings, click the Settings pane.

2) Select your preferred theme (left). It's probably the one listed as "default."

3) Click the Keyboard tab.

4) Click the "+" button to add a new Key to Action mapping.

• Key: cursor left

• Modifier: option

• Action: send string to shell:

• In the blank blank space: \033b

  Note: This is the ESC key followed by a lowecase “b“.
• Click OK.

5) Click the "+" button to add a new Key to Action mapping.

• Key: cursor right

• Modifier: option

• Action: send string to shell:

• In the blank blank space: \033f

  Note: This is the ESC key followed by a lowercase “f“.
• Click OK.


Or just click the "option as meta" checkbox!


Thanks. Interestingly enough in iTerm2 this option is worded as "Left/Right option key acts as +Esc" rather than "Meta"


It works for me right out of the box on a brand new Lion install. No settings have been changed yet.


Didn't realize that "alt" here meant the "esc" key.


I am talking about the "alt/option" key on the keyboard. No "esc".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: