Moving the Cursor

Now that you know the basics of vi, the next step is to start honing your skills. Many of the files you edit can be large. Suppose you want to move through the file rapidly? Typically, the arrow keys on the keyboard are available to move the cursor up, down, left, and right. If you try the arrow keys and they refuse to cooperate (sometimes the keyboard mappings are not what vi expects), you should be able to use the h, k, j, and l keys to move left, down, up, and right, respectively.

Sounds like it might take many keystrokes (and much time) to move through a large file, doesn't it? Generally, if you find yourself typing repeated cursor movement keys for many seconds, you should think of another way to move around in your file. ...

Get Korn Shell Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.