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)
Written by Daniel Kosalla
Related protips
2 Responses
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/7069/9fb2ed695d71ecbdf9befdb52ac36e98.jpeg)
I wrote about something similar a while back: http://mrjoelkemp.com/2013/06/remapping-iterm2-option-keys-for-fish-terminal/
over 1 year ago
·
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/88294/d89bb78810f630497416ba14de5882f7.png)
Nice article there. Does your method work when you ssh into bash or zsh?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#