9. The ex EditorThe ex line editor serves as the foundation for the screen editor vi . Commands in ex work on the current line or on a range of lines in a file. Most often, you use ex from within vi . In vi , ex commands are preceded by a colon and entered by pressing Return. You can also invoke ex
on its own -- from the command line -- just as you would invoke vi
. (You could execute an ex
script this way.) You can also use the vi
command This chapter presents the following topics:
For more information, see Learning the vi Editor , listed in the Bibliography. 9.1 Syntax of ex CommandsTo enter an ex command from vi , type:
An initial You can exit ex in several ways:
9.1.1 AddressesIf 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 each be a line number or a symbol. Using 9.1.2 Address Symbols
See Chapter 6, Pattern Matching , for more information on using patterns. 9.1.3 Options
|
|