This section summarizes the ex commands used from the colon prompt in vi.
Address | Includes |
---|---|
| All lines in the file |
| Lines x through y |
| Lines x through y, with current line reset to x |
| Top of file |
| Current line |
| Absolute line number n |
| Last line |
| All lines; same as
|
| n lines before x |
| n lines after x |
| One or n lines previous |
| One or n lines ahead |
| Line marked with x (single quote) |
| Previous mark (two single quotes) |
| Ahead or back to the line where pat matches |
The following table of ex commands covers both standard ex commands and selected commands specific to Vim. Commands covered in Vim—vi Improved are omitted here.
Full name | Command | Vim only |
---|---|---|
Abbrev |
| |
Append |
[ | |
Args |
| |
Args |
| ✓ |
Bdelete | [ | ✓ |
Buffer | [ | ✓ |
Buffers | [ | ✓ |
Center | [ | ✓ |
Change |
[ | |
Chdir | | |
Copy | [ | |
Delete | [ | |
Edit |
| |
File |
| |
Global | [ | |
Insert |
[ | |
Join | [ | |
K (mark) | [ | |
Left | [ | ✓ |
List | [ | |
Map |
| |
Mark | [ | |
Mkexrc |
| ✓ |
Move | [ | |
Next |
| |
Number | [ | |
Open | [ | |
Preserve | | |
Previous | | ✓ |
[
| ||
Put | [ | |
Quit |
| |
Read | [ | |
Read | [ | |
Recover |
| |
Rewind |
| |
Right | [ | ✓ |
Set |
| |
Shell | | |
Source |
| |
Stop |
| |
Substitute | [ | |
Suspend |
| |
T (to) | [ | |
Tag | [ | |
Unabbreviate |
| |
Undo | | |
Unmap |
| |
V (global exclude) | [ | |
Version | | |
Visual | [ | |
Visual |
| |
Write | [ | |
Write | [ | |
Wall (write all) |
| ✓ |
Wq (write + quit) |
| |
Wqall (write all + quit) |
| ✓ |
Xit | | |
Yank | [ | |
Z (position line) | [ type can be one of:
| |
! (execute command) | [ | |
@ (execute register) | [ | |
= (line number) | [ | |
< > (shift) | [ | |
& (repeat substitute) | [ | |
~ | [ Like | |
Return (next line) | ||
Address |
3.17.184.90