Skip to content

Instantly share code, notes, and snippets.

@madis
Last active July 18, 2016 12:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madis/6577917 to your computer and use it in GitHub Desktop.
Save madis/6577917 to your computer and use it in GitHub Desktop.
Use [option] + [arrow] on OS X iterm2 to move and delete by word
  1. in ~/.inputrc:
"\M-d": backward-kill-word
"\e[1;5C": forward-word
"\e[1;5D": backward-word
  1. iTerm2 preferences: Profiles -> Keys
  1. mark Left option key acts as +Esc

  2. ⌥← to Action: Send Escape Sequence Esc+: [1;5D

  3. ⌥→ 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment