Title: Introduction to the vi Editor
Course: CIS 121: Linux/UNIX I: Fundamentals ~ For IGNITE Review > Section: Learning Modules

Vi was created by Bill Joy in 1976. It is available in virtually every version of UINX and Linux (part of Single UNIX Specification). But vi is not a word processor – You would not want to write your resume using vi. It seems primitive, but it is still very widely used and remains the editor of choice for many sys admins when editing configuration files and or other text files.

The vi editor is a modal editor, meaning you can use it in two distinct modes.  This modality is one of the sources of confusion when first using vi because behavior in the two modes is so different.  The two modes are:

- Command Mode (Normal Mode) – Any character entered is a command.
- Insert Mode (Text Input Mode) – Any character entered is treated as text to be added to the file.

You press the Esc key to return to Command Mode from Insert Mode.

As you begin to work in vi, it would be useful to create a file called ".exrc" in your home directory and place in it the following line:

set showmode

This will setup vi to indicate when you are in insert mode.