Modes of Operation

The vi editor supports three modes of operation: command mode, in which keys are interpreted as commands; insert mode, in which keys are interpreted as input to the file; and last-line mode, in which ex commands can be entered.

Command Mode

As indicated earlier, upon entering vi, the editor is in command mode. This means that you can enter any of the vi command mode commands. The typical new user complaint is that no prompt exists in command mode. In fact, this is true for two of the three vi modes. We can whine about it, or accept it and move on. Basically, the editor accepts any characters typed while in command mode as commands. The commands usually are one-letter commands. They do not echo when typed, and the editor does ...

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.