Monday, April 16, 2012

Navigating in iTerm2

Configuring the navigation and deleting word on iTerm2 
  1. GOTO ITerm --> Preferences --> Keys
  2. Click on Add button (+ symbol) at the bottom to add a keyboard shortcut.
  3. Set the preferred Keyboard shortcut for the operation being performed.
  4. Set the Action as "Send Escape Sequence" or "Send Hex Code" depending upon the operation's code (Codes given below for each action)
Codes To Move a Word:
Left: Send Escape Sequence 'b'
Right: Send Escape Sequence 'f'
Send Escape Sequence

Setting up Keyboard Shortcut (Sending Escape Sequence)


Codes To Delete a Word:
Left: Send Escape Sequence 'd'
Right: Send Hex Code 0x1b 0x7f
Send Hex Code
Setting up Keyboard Shortcut (Sending Hex Code)

Tips: The following shortcut keys worked well for me!
  • For Navigation: option(alt) + left/right
  • To Delete a word right to cursor: option(alt)+d
  • To Delete a word left to cursor: option(alt)+Shift+d

Note: Make sure the shortcut keys that you are using for these does not get overridden in  "ITerm-->Preferences-->Profile-->Keys"

No comments: