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

Book HomeLinux in a NutshellSearch this book

11.12. Syntax of ex Commands

To enter an ex command from vi, type:

:[address]  command  [options]

An initial : indicates an ex command. As you type the command, it is echoed on the status line. Enter the command by pressing Return. address is the line number or range of lines that are the object of command. options and addresses are described in the following sections. ex commands are described in the alphabetical summary.

11.12.2. Addresses

If no address is given, the current line is the object of the command. If the address specifies a range of lines, the format is:


where x and y are the first and last addressed lines (x must precede y in the buffer). x and y may be line numbers or symbols. Using ; instead of , sets the current line to x before interpreting y. The notation 1,$ addresses all lines in the file, as does %.

Library Navigation Links

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