Modes of Operation

vi doesn't use the function keys much, which will probably confuse those of you coming in from the commercial word processing world. Virtually all of the vi features are accessed via some combination of the normal alphanumeric keys. vi uses modes to distinguish between the times a key will just put a letter on the keyboard and the times a key will invoke some other vi function.

In edit mode (reached from command mode by typing one of the following; a, i, A, I, o, O …), whatever you type in will appear on the screen.

In command mode, (reached from edit mode by pressing the <Esc> key), the various keys have a confusing variety of functions.

Whatever mode you're in, it is probably wrong. Try hitting the <Esc> key. If that doesn't ...

Get Linux® Desk Reference, Second Edition 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.