Skip to content

Instantly share code, notes, and snippets.

@seachai
Last active May 29, 2025 19:39
Show Gist options
  • Save seachai/948ed1eeafa32ce03db6685edb879f71 to your computer and use it in GitHub Desktop.
Save seachai/948ed1eeafa32ce03db6685edb879f71 to your computer and use it in GitHub Desktop.
iTerm 2 Natural Text Editing Preset
On iTerm2 - Open Preferences > Profiles > Keys > Key Mappings > Presets > Select Natural Text Editing
- 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
@TheRojam
Copy link

TheRojam commented Nov 15, 2024

With iterm now, selecting "Natural Text Editing" only gives me 8 bindings. I'm missing quite a few.

Same and I think this is not working correctly.

@brilliantinsane
Copy link

Same here. For now what I do is replace "0x1b 0x7f" with just 0x17. Just double click "Send Hex Codes: ..." and edit the value in the prompt.
Hopefully, it will be fixed soon.

@germanoclodi
Copy link

Same here. For now what I do is replace "0x1b 0x7f" with just 0x17. Just double click "Send Hex Codes: ..." and edit the value in the prompt. Hopefully, it will be fixed soon.

Life saver

@colinwarmstrong
Copy link

Same here. For now what I do is replace "0x1b 0x7f" with just 0x17. Just double click "Send Hex Codes: ..." and edit the value in the prompt. Hopefully, it will be fixed soon.

Worked for me as well, thanks for the tip! Hoping this gets fixed soon, I spent way too much time trying to figure out why I couldn't delete entire words with "option-del"

@Preclowski
Copy link

Preclowski commented Dec 6, 2024

According to this PR https://github.com/gnachman/iTerm2/pull/510/files

Its just matter of removing quotes from "Send Hex Codes"

"0x1b 0x7f" <--- bad
0x1b 0x7f <--- right

@Ian729
Copy link

Ian729 commented Dec 10, 2024

love you guys so much! These discussion are just so helpful, life saver!

@smartinrub
Copy link

According to this PR https://github.com/gnachman/iTerm2/pull/510/files

Its just matter of removing quotes from "Send Hex Codes"

"0x1b 0x7f" <--- bad
0x1b 0x7f <--- right

This worked for me. Thanks!

@artismarti
Copy link

According to this PR https://github.com/gnachman/iTerm2/pull/510/files

Its just matter of removing quotes from "Send Hex Codes"

"0x1b 0x7f" <--- bad
0x1b 0x7f <--- right

omg! Thank you so much!!!! 💚

@GautierT
Copy link

According to this PR https://github.com/gnachman/iTerm2/pull/510/files

Its just matter of removing quotes from "Send Hex Codes"

"0x1b 0x7f" <--- bad
0x1b 0x7f <--- right

Thanks a lot !!!

@janposlusny
Copy link

According to this PR https://github.com/gnachman/iTerm2/pull/510/files

Its just matter of removing quotes from "Send Hex Codes"

"0x1b 0x7f" <--- bad
0x1b 0x7f <--- right

Thank you!

@franua
Copy link

franua commented Apr 2, 2025

According to this PR https://github.com/gnachman/iTerm2/pull/510/files

Its just matter of removing quotes from "Send Hex Codes"

"0x1b 0x7f" <--- bad
0x1b 0x7f <--- right

You are a life saver, sir! Thank you!

@sunlee-newyork
Copy link

thank you!

@LemonNekoGH
Copy link

Thank you so much

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