Word wise navigation in iTerm2

Navigating in the terminal can be quite cumbersome but there are “Escape Sequences” to the rescue.

Open the preference pane of “iTerm2″ (or just hit CMD + ,) and go to the “Profiles” menu. There you should find a tab called “Keys”.

Create a new Key-Binding and assign “⌥ + ←” (Option + Left) as the Shortcut. Now choose “Send Escape Sequence” as “Action” and set “Esc + b” as value.

Now you should have a ‘jump word wise backward’ cursor..

Do the same for the “⌥ + →” (Option + Right) and use “Esc + f” as sequences which allows you to jump word wise forward.

Update: What about deleting word-wise ? Just define “⌥ + DELETE” (Option + Delete) and choose “Send Hex Codes” with 17 as value and you’re done.

Feel free to share or leave a comment and now:
happy navigating and deleting.. ;)

~david

This entry was posted in howto and tagged , , , . Bookmark the permalink.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">