tags:

views:

34

answers:

2

In zshell how to move forward word, I can set -o vi and use vi format. Is there a way to move forward in zshell by a word

+2  A: 

Your zsh command prompt works either like emacs or like vi. If it works like vi, put it in command mode (esc) and type w. If it works like emacs, use M-f.

More information available at man zshzle.

Carl Norum
+2  A: 

The ZLE widget for moving forward by one word is forward-word. Therefore, you may use bindkey to bind this widget to any key you want.

For example,

$> bindkey ^O forward-word

would allow you to move forward by one word when pressing Ctrl-O. Note that ^O is actually a quoted insert of Control followed by O.

sykora
+1 for the general answer.
Carl Norum