skip to content
Just Change Direction

How to use keyboard shortcuts to delete a word or line in iTerm2

/ 1 min read

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