Skip to content

Instantly share code, notes, and snippets.

@gregilo
Last active May 4, 2026 13:58
Show Gist options
  • Select an option

  • Save gregilo/a90433876570bc8f50fcd18b14b73b27 to your computer and use it in GitHub Desktop.

Select an option

Save gregilo/a90433876570bc8f50fcd18b14b73b27 to your computer and use it in GitHub Desktop.
iTerm2 Mac Keybindings (for easier editing and cursor movement)

These keybindings make working with iTerm2 on a Mac much easier! Credit to https://stackoverflow.com/a/22312856 (@sqren)

Move cursor one word left

Keyboard Combination: +
Action: Send Hex Code
Code: 0x1b 0x62

Move cursor one word right

Keyboard Combination: +
Action: Send Hex Code
Code: 0x1b 0x66

Move cursor to beginning of line

Keyboard Combination: +
Action: Send Hex Code
Code: 0x01

Move cursor to end of line

Keyboard Combination: +
Action: Send Hex Code
Code: 0x05

Delete word

Keyboard Combination: + ←Delete
Action: Send Hex Code
Code: 0x1b 0x08

Delete line

Keyboard Combination: + ←Delete
Action: Send Hex Code
Code: 0x15

Undo

Keyboard Combination: + z
Action: Send Hex Code
Code: 0x1f


Don't forget to remove the previous bindings:

Open the “Profiles” tab
Click the sub-tab ”Keys”
Remove the mappings for key combinations + and +

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