Move the cursor word by word on Mac OS X iTerm2

Mac OS X doesn’t support readline’s alt-b and alt-f.  It has esc-b and esc-f instead.  But, you cannot hold esc to keep moving cursor, instead, you have to type esc-b or esc-f every time to move one word. This is very annoying to me until I found a solution with iTerm2.

Hers’s how to make iTerm2 to support alt-b and alt-f:

  1. Command-; to bring up the Preference menu
  2. Select Keys tab
  3. Click + button on the bottom of the right section (see the red cycle on the screen shot)
  4. Add shortcut key (see the red rectangle on the screen shot) for alt-f and alt-b
  5. Profit

move_cursor_word_by_word

Advertisements

2 thoughts on “Move the cursor word by word on Mac OS X iTerm2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s