home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeLinux in a NutshellSearch this book

Chapter 11. The vi Editor

vi is the classic screen-editing program for Unix. A number of enhanced versions exist, including nvi, vim, vile, and elvis. On Linux, the vi command is usually a link to one of these programs.

vi is based on an older line editor called ex. Powerful editing capabilities can be invoked within vi by pressing the colon (:), entering an ex command, and pressing the Return key. Furthermore, you can place ex commands in a startup file called ~/.exrc, which vi reads at the beginning of your editing session. Because ex commands are still an important part of vi, they also are described in this chapter. On Linux, ex is sometimes called hex.

This chapter, which essentially covers standard vi but reflects nvi extensions, presents the following topics:

For more information, see the O'Reilly book Learning the vi Editor by Linda Lamb and Arnold Robbins.

11.1. Review of vi Operations

This section provides a review of the following:

  • Command-line options

  • vi modes

  • Syntax of vi commands

  • Status-line commands

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.