B.2. Alphabetical List of Commands

In this section, the full name of the ex command is listed as the keyword. To the right of or below each keyword is the syntax, using the shortest abbreviation possible for that command. A brief description follows the syntax.

abbrev

ab [string text]

Define string when typed to be translated into text. If string and text are not specified, list all current abbreviations.

append

[address] a[!]

text

.

Append text at specified address, or at present address if one is not specified. Add a ! to switch the autoindent setting that will be used during input. That is, if autoindent was enabled, ! disables it.

args

ar

Print the members of the argument list (files named on the command line), with the current argument printed within brackets ([ ]).

change

[address] c[!]

text

.

Replace the specified lines with text. Add a ! to switch the autoindent setting during input of text.

copy

[address] co destination

Copy the lines included in address to the specified destination address. The command t (short for "to") is a synonym for copy.

delete

[address] d [buffer]

Delete the lines included in address. If buffer is specified, save or append the text to the named buffer. Buffer names are the lowercase letters a-z. Uppercase names append text to the buffer.

edit

e [!][+n] [filename]

Begin editing on filename. If no filename is given, start over with a copy of the current file. Add a ! to edit the new file even if the current file has not been saved since the last change. ...

Get Learning the vi Editor, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.