- in ~/.inputrc:
"\M-d": backward-kill-word
"\e[1;5C": forward-word
"\e[1;5D": backward-word
- iTerm2 preferences: Profiles -> Keys
-
mark Left option key acts as +Esc
-
⌥← to Action: Send Escape Sequence Esc+:
[1;5D
-
⌥→ to Action: Send Escape Sequence Esc+:
[1;5C
Now you can delete by word with pressing option + delete key down and move by word with pressing option + arrow. Yay!