iTerm2: Add Keystroke to move between words

On a Mac, I use iTerm2 as my default terminal due to the added features, such as auto-copy and the ability to split multiple terminals. One nuance was not having the ability to move between words (like in vim); however, I found the below how-to on Stack Overflow — where else? 🙂

  1. Go to Preferences, Profile, Keys.
  2. Set your left ? key to act as an escape character.
  3. Locate the current shortcut for ? ? or create a new one, with the following settings:
    • Keyboard Shortcut: ??
    • Action: Send Escape Sequence
    • Esc+: b
  4. repeat for the ?? keyboard shortcut with the following settings:
    • Keyboard Shortcut: ??
    • Action: Send Escape Sequence
    • Esc+: f

From this point, you can use Option + [left/right arrow keys]. Yass, productivity skill level increase! Later.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.