The u Key triggers the undo Undo command, which revokes the latest changes. Any content entered or deleted during this period is treated as a modification, starting with insert mode until normal mode is returned. Exception: If you use the <Up>,<down>,<left>,<right> these cursor movement keys in insert mode, a new undo block will be generated.
The <ctrl-r> command will redo the latest changes. The opposite of the U command.
The db command reverses the text from the beginning of the cursor to the beginning of the word, but leaves the character at the beginning of the cursor intact. That is, reverse-delete the next character from the beginning of the cursor to the beginning of the word.
DW command to delete content from the current cursor position to the end of the word. If you delete the last word that is not the current line, the cursor moves to the first letter of the next word, and if you delete the last word in the current line, the cursor does not move.
The x command deletes the character of the current cursor.
The B command moves the cursor to the beginning of the word.
The Daw command interprets "delete a word" and deletes a word. This will not only delete the entire word , but will also remove the space. If you delete the last word that is not the current line, the cursor moves to the first letter of the next word, and if you delete the last word in the current line, the cursor moves to the end of the previous word.
<ctrl-a> Command performs an incremental operation. <ctrl-x> Command performs a decrement operation. If a prefix of n times is taken, it is executed n times. Example:10<ctrl-a> will execute 10 times. If the current cursor is not on a number, the first number after the current cursor is found for the current line. If it is found, jump there and perform the operation.
Vim interprets numbers beginning with 0 as octal values instead of decimal. In the octal system, 007+001=010.
d2w, first call the Delete command, and then take 2w as the action command, interpreted as "delete two words";
2DW , the number of times acting on the delete command, the action command only across a word, interpreted as "do two delete word operation."
DW. (point) , interpreted as "delete a word, and then repeat the last action."
operator + Action command = Operation
Vim's operator
operator Use
C Modification (change)
D Remove (delete)
Y Copy to register (copy)
g~ Invert case
Gu Convert to lowercase
GU Convert to uppercase
> Increase Indent
< Decrease Indent
= Auto Indent
The action command can represent a character for L (letter initials), AW (the acronym for Word a) represents a complete word, and the AP (the initials of a paragraph) represents an entire paragraph.
Vim Normal Mode