The vi editor is the most popular editor used to edit or create new files from a shell prompt. It comes in text-based as well graphical interface form, with extended features. This text-based editor is used to write a script, edit system configuration files, or develop the source code of a programming language. The name vi is pronounced as vee-eye.
The vim (short for vi improved) version of the vi editor comes with many enhancements to make working with the vi editor easier. It supports extended features, such as syntax highlighting for many configuration files and programming languages. Whatever we learn about vi editor is applicable to vim also, so we will learn about the vi editor in this section.
There are three modes of operation of the vi editor, as follows:
- Command Mode
- Insert Mode
- Line Mode
The following diagram shows the different modes...