Sun, 10, Mar 2002 12:43:00 AM

by Charles Miller on March 10, 2002

Another one from Mark Pilgrim. A quote from the vi tutorial

Q. How do I move the cursor one character forward in vi?

The correct answer is:

<ESC>la

which works in all modes. Except at the beginning of a line, where the above command will move the cursor two characters forward. If it did anything else, it would not be vi. So at the beginning of the line, this answer is the correct one:

<ESC>li

And of course neither will work at the end of the line. At the end of the line, the correct command is:

<ESC>j^i

The topic of the next two lectures will be "how to move the cursor one character backward in vi''...

Previously: Sun, 10, Mar 2002 12:30:00 AM

Next: Pacing as Meditation