I learned some simple mobile shortcuts for vim last time and used them for a period of time.
You are already familiar with these shortcut keys.
Continue learning now
This time, we will summarize some shortcut keys for inserting, searching, replacing, and copying and cutting.
Insert and delete shortcuts
A: insert after the cursor
B: Insert before the cursor
Dd: delete a row
D + number + direction: delete several lines/characters to a certain direction
After a row is deleted by cc or S, the row enters the insert mode at the beginning of the row.
Dw deletes a word (excluding the characters before the word after the current cursor), and the cursor reaches the first word of the next word.
Cw deletes a word and enters the insert mode.
X or dl delete a character on the right of the cursor
S or cl delete a character on the right of the cursor and enter insert mode
Search shortcuts
#: Search up the word with the current cursor
*: Find the word where the current light is changed.
Search for replacement shortcuts
Template:
: S/STRING/REPLACE
Instance
: S/of/OF Replace the next
: % S/of/OF all Replace with
: Replace 1, 3 s/of/OF/g 1st to 3 rows of
Copy and paste operations in visual mode
V highlighted by characters
V highlight by line
Ctrl + v highlight by block
After selection, you can perform the copy and cut operations.
D. Cut the content.
Y: copy the content.
C. Cut the content and enter the insert mode.
Paste a key.
P paste the previous content
There is also a copy cut command in command mode
Dd: Cut the current row
Yy: copy the current row
Cc: Cut the current row and enter the insert mode
This learning is here, and I will continue my next study after I have mastered it.