Skip to content

Instantly share code, notes, and snippets.

@seachai
Last active May 18, 2026 18:00
Show Gist options
  • Select an option

  • Save seachai/948ed1eeafa32ce03db6685edb879f71 to your computer and use it in GitHub Desktop.

Select an option

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
@theliuk

theliuk commented Jun 25, 2024

Copy link
Copy Markdown

Thank you guys for your life saving screenshots. I spent 30 minutes trying to understand why I didn't see the Natural Text Editing option.

@n0kovo

n0kovo commented Aug 23, 2024

Copy link
Copy Markdown

Bruh <3

@rivehafintosh

rivehafintosh commented Oct 29, 2024

Copy link
Copy Markdown

oh my god this thread saved my life...after wasting 30 minutes like everyone else.... chat gpt was useless and you saved my ass from breaking my mac... this app's preferences UI is garbage, overly complex with pointless features(that i'm sure I'll be happy about later on) and the only option I wanted to change super deeply hidden... why the hell doesn't it come set by default and the weird profile get set manually for some non standard behavior anyways?

@uddesson

uddesson commented Nov 6, 2024

Copy link
Copy Markdown

+1 for finding this helpful, I was also looking in the wrong place. Thanks for posting!

@uxduck

uxduck commented Nov 15, 2024

Copy link
Copy Markdown

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

settings

@TheRojam

TheRojam commented Nov 15, 2024

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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

Preclowski commented Dec 6, 2024

Copy link
Copy Markdown

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

Ian729 commented Dec 10, 2024

Copy link
Copy Markdown

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

@smartinrub

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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

franua commented Apr 2, 2025

Copy link
Copy Markdown

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
Copy Markdown

thank you!

@LemonNekoGH

Copy link
Copy Markdown

Thank you so much

@ldyeob

ldyeob commented Sep 8, 2025

Copy link
Copy Markdown

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!

@nilankadesilva

Copy link
Copy Markdown

If you watching Preference-Keys, (What I did for 30 minutes) you should go to Preference-Profile-keys-key mappings

image

Thank you!

@asadbek064

Copy link
Copy Markdown

πŸ‘

@Xenthys

Xenthys commented Feb 5, 2026

Copy link
Copy Markdown

I can't believe this old Gist is both the first search result I got and the best tutorial for that, all thanks to screenshots in the comments.

@ghilman27

Copy link
Copy Markdown

Bro, you are a life saver! γ‚γ‚ŠγŒγ¨γ†γ”γ–γ„γΎγ™οΌ

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