Mac OS X Terminal: Keyboard word shortcut

Published on September 07, 2014

If you use the Mac Terminal app and want to navigate word by word instead of by character, the default instinct would be to press option+left cursor or option+right cursor.

Unfortunately, pressing that would give a [D or [C.

To set up the keyboard shortcut correctly, we should first know that the Mac shortcut for word navigation is esc+f for going one word forward and esc+b for going one word backwards.

Open up the Terminal.app by going to Finder > Utilities (or Ctrl+U) > Terminal.app

In Terminal, go to Terminal → Preferences

Under Preferences, go to Settings tab and select the Keyboard tab on the right.

Change the option cursor left Key to \33f by double-clicking on it. Delete the [D characters by clicking on "Delete one character" button. Then, press f so your screen will look like this:

The same way, change the option cursor right Key to 33f.

If you've cleared the box by accident, you can get the 33 by pressing the esc key.

Make sure the checkbox with Use option as meta key is checked.

After making the changes, go back to the Terminal and try option+left cursor and you should be able to navigate word by word on the left.

Related Posts

If you have any questions, please contact me at arulbOsutkNiqlzziyties@gNqmaizl.bkcom. You can also post questions in our Facebook group. Thank you.

Disclaimer: Our website is supported by our users. We sometimes earn affiliate links when you click through the affiliate links on our website.

Published on September 07, 2014

← Previous Post
RubyConf 2013

Next Post →
How to install Windows 7 on VirtualBox