Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nahurst/386b54fc0da7e06b7cc87f5bbb2a9629 to your computer and use it in GitHub Desktop.
Save nahurst/386b54fc0da7e06b7cc87f5bbb2a9629 to your computer and use it in GitHub Desktop.
iTerm 2 Natural Text Editing Preset
Go to Preferences... > Profiles > Keys
Press Load Preset...
Select Natural Text Editing
Then, you can move a word backwards using Option ⌥ + ← and a word forwards using Option ⌥ + →, move to the start of the line using fn + ← and to the end of the line with fn + →. Also you can delete a word backwards using Option ⌥ + ⌫, delete the whole line using Command ⌘ + ⌫.
If the preset doesn't appear, reinstall iTerm2. If you installed it using Homebrew+Cask:
brew cask reinstall iterm2
Also add undo as a Profile > Keys
Keyboard Combination: ⌘ + z
Action: Send Hex Code
Code: 0x1f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment