Skip to content

Instantly share code, notes, and snippets.

@jakowicz
Created July 16, 2019 09:52
Show Gist options
  • Save jakowicz/3efb883d22223a292a280842f9d2ef01 to your computer and use it in GitHub Desktop.
Save jakowicz/3efb883d22223a292a280842f9d2ef01 to your computer and use it in GitHub Desktop.
Unshamelessly stolen from : https://stackoverflow.com/a/37720002
Which unshameless stole it from : http://elweb.co/making-iterm-2-work-with-normal-mac-osx-keyboard-shortcuts/
For this and other shortcuts go to preference -> profile -> keys, add the following shortcuts
# Move one word to the left
⌥← : Send Escape Sequence Esc+ b
# Move one word to the right
⌥→ : Send Escape Sequence Esc+ f
# Go to the start of the line - Unnecessary, can use ctrl-a
⌘← : Send Escape Sequence Esc+ [H
# Go to the end of the line - Unnecessary, can use ctrl-e
⌘→ : Send Escape Sequence Esc+ [F
# Clear the current line
⌘←Delete : Send Hex Code 0x15
# Delete one word to the left
⌥←Delete : Send Hex Code 0x1B 0x08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment