Samsara

Life, the universe and everything.

Saturday, May 12, 2007

vi mode additions

Just for the people who don't like to bother and go lookup things,
here's a short list of things you can do (esc before) :
^ beginning of line
$ end of line
w next word
b prev word
dd delete line
cw change word at cursor
\ filename complete
k prev line
j next line
h cursor left
l cursor right

...

Enjoy.

set -o vi

I recently came into an environment where all we had was ksh.
No bash, at first view no easy file name completion, no arrow up, no arrow down.
Most of my co-workers were using vi mode.

Since some of my friends told me vi mode was the way to go before and
I never listened before, I decided to give it another try.

After a couple of weeks of using it, I converted all my .profiles to
include "set -o vi".
Try it, once you get used to it, you don't want to let go.
^e, ^a is cool, but using vi key bindings is intuitive when you want
to move a word, esc k or esc j to go up or down, dd to remove your
line and / to find one of the previous commands.

vi mode rocks!