I finally found it:
- to go back a word, press Esc, then the letter b
- to go forward a word, press Esc, then the letter f
I must say that the key sequence is some what awkward to hit right. Never mind about repeating it to move back/forward several words.
With that said, I found what I was looking for.
7 comments:
Alt+b and Alt+f seems much more convenient to me.
Map capslock to esc. Should't ppl do that for vi/emacs anyway?
you can map any key combination for forward-word and backward-word. Just try these in your ~/.inputrc:
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
http://linuxart.com/log/archives/2005/10/13/super-useful-inputrc/
Alt B and Alt F has the advantage of repeating the action by holding down alt, and repeatedly hitting f or b. Escape you have to release/depress again before you can repeat.
set -o vi
use vi on the command line
hi,
I don't get the problem; maybe it's because this article is five years old.
but I just hit Ctrl. and right/left arrow and Ctrl.+a to go to the beginning or Ctrl.+e to the end of the line.
hanes
With iTerm2, go to Preferences, Profiles, Keys and set Left option/Right option key acts as "+Esc"
Post a Comment