Setting up Mac navigation shortcuts in iTerm 2

If you’re a Macintosh user, it is probably second nature to use ⌥← to go back one word and ⌥→ to forward a word. Similarly, ⌘← will bring you to the beginning of a line while ⌘→ will jump you to the end. However, by default, iTerm 2, a great replacement for macOS’s included Terminal application, is not set up to work this way. Fortunately, it is possible to map your keys in a way to get this functionality.

In iTerm, go to your Preferences and then the Profiles tab. Click on the Profile you are using and choose the “Keys” tab.Keys preference

From there, you can click on the + button below the existing Key Mappings and use the following settings to emulate the default Macintosh behavior.

Back One Word

Back one word

Forward One Word

Forward one word

Go to Beginning of Line

Beginning of line

Go to End of Line

End of line


Leave a comment

Your email address will not be published. Required fields are marked *