Last Updated: February 25, 2016
·
1.881K
· dejnon

Setting my iTerm2

Add this to your your ~/.inputrc

"\e[1;5C": forward-word
"\e[1;5D": backward-word

Then in the iTerm2 config:

KEYS  ACTION              SEND
cmd← "HEX CODE"          0x01 
cmd→  "HEX CODE"          0x05
alt← "ESCAPE SEQUENCE"   b
alt→  "ESCAPE SEQUENCE"   f
cmd backspace "HEX CODE"  0x15
alt backspace "HEX CODE"  0x17

Now you can alt + ← to jump word left and cmd + ← to go to the beginning of the line.

With this settings you can:

  • jump to beginning / end of a line (cmd+arrows)

  • jump words backwards / forwards (alt+arrows)

  • delete whole line (cmd+backspace)

  • delete word (alt+backspace)

2 Responses
Add your response

over 1 year ago ·

Nice article there. Does your method work when you ssh into bash or zsh?

over 1 year ago ·