
720
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Chapter 9
9
The vi, ex, and vim Editors
The vi and ex editors are the “standard” editors on Unix systems. You can count
on there being some version of them, no matter what Unix flavor you are using.
The two editors are in fact the same program; based on how it was invoked, the
editor enters full-screen mode or line mode.
vim is a popular extended version of
vi. On some Linux distributions, the vi
command invokes vim in a vi-compatible mode.
This chapter presents the following topics:
• Conceptual overview
• Command-line syntax
• Review of vi operations
• Alphabetical list of keys in command mode
• vi commands
• vi configuration
• ex basics
• Alphabetical summary of ex commands
vi is pronounced “vee eye.”
Besides the original Unix vi, there are a number of freely available vi clones
(including vim). Both the original vi and the clones are covered in Learning the vi
Editor (O’Reilly).
Conceptual Overview
vi is the classic screen-editing program for Unix. A number of enhanced versions
exist, including nvi, vim, vile, and elvis. On GNU/Linux systems, the vi
command is usually one of these programs (either a copy or a link). The Emacs
editor, covered in Chapter 8, has several vi modes that allow you to use many of
the same commands covered in this chapter.