You have already been introduced to the basic vi editing commands, i, a, c, d, and y. This chapter expands on what you already know about editing. It covers:
Description of additional editing facilities, with a review of general command form
Additional ways to enter vi
Making use of buffers that store yanks and deletions
Marking your place in a file
In Chapter 2, you learned the edit commands c, d, and y, as well as how to combine them with movements and numbers (such as 2cw or 4dd). In Chapter 3, you added many more movement commands to your repertoire. Although the fact that you can combine edit commands with movement is not a new concept to you, Table 4.1 gives you a feel for the many editing options you now have.
|Change||Delete||Copy||from Cursor to ...|
|cH||dH||yH||top of screen|
|cL||dL||yL||bottom of screen|
|c5|||d5|||y5|||column 5 of current line|
|2c)||2d)||2y)||second sentence following|
|cG||dG||yG||end of file|
|c13G||d13G||y13G||line number 13|
Notice how all of the above sequences follow the general pattern:
number is the optional numeric argument. command in this case is one of c, d, or y. text object is a movement command.
Copyright © 2003 O'Reilly & Associates. All rights reserved.