In this section we take a look at the delete, delete command is relatively simple, but to make the deletion more efficient
You need to match the various move commands we've talked about in the first section.
Character deletion
x Delete the character at the cursor x Delete the first character of the cursor
There's nothing to notice here, but it's important to note that
Usually, when a novice is anxious, he will press the X, thus achieving the goal of deleting a large chunk of text.
If it is the first few days use fortunately said, but from a long thought, you also need to learn the following delete command
Word deletion
DW Delete to the beginning of the next word de Delete to the end of this word de delete to the end of this word includes the punctuation inside the DB deleted to the previous word db deleted to the previous word including punctuation
Obviously, D is the abbreviation for delete, and the x above is the old-fashioned clear meaning.
Here e means to delete a word forward, b means to delete a word, and the first section moves very clearly.
Note that e B ignores punctuation, such as Don ' t, which they will delete as three words, Don, ' and T.
And the uppercase E B will not
Row Delete
DD Delete a whole line d d$ Delete the cursor position to the end of the bank D0 Delete the cursor position to the beginning of the bank
These three kinds of usage are best understood
I said from the beginning that deleting a command requires a move command in order to play more role
You can take a look at the first section and then try to delete a section or a piece of content yourself.
tips:3dd means delete three lines, smart you must have known
Brisk Vim (iii): delete