For ages it has bugged me that I can’t delete a word (opt
+ backspace
) or a whole line (cmd
+ backspace
) in iTerm2 using the normal keyboard shortcuts (like is VSCode).
Turns out it is a simple setting to fix this (thanks to this Stack Overflow).
To fix it, do the following:
- Open iTerm2
- Go to Settings
- Profiles
- Click the Keys tab (note there are 2x Keys tab. One top level one, another for the profile. You want the latter)
- Then Key mappings
- You should see a dropdown where you can select “Natural Text Editing”
- Select this and you should be away