This appendix describes the syntax of ex commands and then presents an alphabetical list of ex commands.
address is the line number or range of lines that are the object of command. If no address is given, the current line is (usually) the object of the command.
In ex command syntax, address can be specified in any of the forms shown in Table B.1.
|1,$||All lines in the file|
|x,y||Lines x through y|
Lines x through y, with current line reset to x
|0||Top of file|
|n||Absolute line number n|
|%||All lines; same as 1,$|
|x-n||n lines before x|
|x+n||n lines after x|
|-[n]||One or n lines previous|
|+[n]||One or n lines ahead|
|'x||Line marked with x|
|/pat/ or ?pat?||Ahead or back to line where pat matches|
In ex command syntax, options might be any of the following:
Indicates a variant form of the command, overriding the normal behavior.
Copyright © 2003 O'Reilly & Associates. All rights reserved.