
742
|
Chapter 9: The vi, ex, and vim Editors
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
buffers
buffers[!]
Print the members of the buffer list. Some buffers (e.g., deleted
buffers) will not be listed. Add ! to show unlisted buffers. ls is
another abbreviation for this command. {vim}
cd
cd dir
chdir dir
Change current directory within the editor to dir.
center
[address] ce [width]
Center line within the specified width.Ifwidth is not specified, use
textwidth. {vim}
change
[address] c[!]
text
.
Replace the specified lines with text. Add a ! to switch the autoin-
dent setting during input of text. Terminate input by entering a line
consisting of just a period.
close
clo[!]
Close current window unless it is the last window. If buffer in
window is not open in another window, unload it from memory.
This command will not close a buffer with unsaved changes, but
you may add ! to hide it instead. {vim}
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.
Example
:1,10 co 50 Copy first 10 lines to just after line 50
delete
[address] d [register]
Delete the lines included in address.Ifregister is specified, save or
append the text to the named register. Register names are the
lowercase letters a–z. Uppercase names append text to the corre-
sponding register. ...