Jump forwards, backwards and delete a word in iTerm2 on Mac OS

Jonny Haynes
2 min readMar 22, 2017

--

Unlike all other Mac OS apps, iTerm2 doesn’t allow you to use ⌥+← or ⌥+→ to jump over words.

You also can’t delete a whole word using ⌥+backspace.

Here’s how you can configure iTerm2 on Mac OS to allow you to do just that.

Backspace

First you need to set your left ⌥ key to act as an escape character. This can be done going to iTerm2 > Preferences > Profiles > Keys. Fetching up the following preference panel and options.

Bottom right are where the controls are located to do this.

By doing this you can now use ⌥+backspace to delete a whole word.

Backwards

Next, click the plus icon to add a new Key Mapping.

Press the key command: ⌥+←; select Send Escape Sequence from the dropdown; and lastly input the character ‘b’.

Forwards

Repeat for ⌥+→, but this time use the character ‘f’.

And that’s it. Simple really once you know how. But will save you a whole heap of pain in the long run. So totally worth it.

--

--

Jonny Haynes

An 🏆🏅 winning, decorator of pixels, and colourer of code. Play 🎸, drink 🥃, 🚵 and part-time 📺&📻 star. Dad of 👦🏼👦🏼👧🏼. I do all my own stunts. He/Him.