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