Chapter 4. Beyond the Basics
You have already been introduced to the basic editing commands,
i, a, c, d, and y. This chapter expands on what you
already know about editing. It covers:
-
Descriptions of additional editing facilities, with a review of the general command form
-
viand Vim command-line options, including different ways to open a file for editing -
Making use of registers that store yanks and deletions
-
Marking your place in a file
-
Other advanced edits
More Command Combinations
In Chapter 2, “Simple Editing”,
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, “Moving Around in a Hurry”,
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 presents
several additional editing options you have not seen before.
| Change | Delete | Copy | From cursor to… |
|---|---|---|---|
|
|
|
Top of screen |
|
|
|
Bottom of screen |
|
|
|
Next line |
|
|
|
Column 5 of current line |
|
|
|
Second sentence following |
|
|
|
Previous paragraph |
|
|
|
Pattern |
|
|
|
Next pattern |
|
|
|
End of file |
|
|
|
Line number 13 |
Notice how all of the sequences in Table 4-1 follow one of two general patterns:
(command)(number)(text object)
or:
(number)(command)(text object)
number is the optional numeric argument. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access