- CW deletes the text from the cursor position to the end of the current word and switches to insert mode.
- DW deletes the text from the cursor position to the end of the current word and moves to the first letter of the next word.
Repeatable operations and how to rewind
Purpose Operation Repeat Fallback
Make a change to {edit} . u
Finds the next specified character in a row F{char}/t{char} ; ,
Finds the previous specified character F{char}/t{char} in a row ; ,
Find the next occurrence in a document/pattern n N
Find the previous match in the document? Pattern n N
Perform replacement: S/target/replacement & u
:%s/target/replacement (Find all and replace All)
(All modifications from entering the insert mode to leaving are a modification)
H cursor moves one character to the left
J Cursor moves to the next line
K cursor moves to the previous line
l (Small Letter of L) cursor moves one character to the right
$ cursor moves to end of line
^ cursor moves to the beginning of the line
A inserts the contents after the current cursor
I insert content before the current cursor
Compound Command equivalent long command function
C $ Delete all the current cursor to the end of the line and enter insert mode
s cl deletes the current cursor content and enters insert mode
S ^c Delete the current entire line and enter insert mode
I (Capital letter i) ^i moves to the beginning of the line and inserts the contents before the current cursor
A $a moves to the end of the line and inserts content after the current cursor
o a<enter> insert a blank line below the current line to add content
O ko inserts a blank line above the current line add content
Vim Practical Tips 1