Vim file Editor Common operations Summary:
Copy
YY Copy a row
10yy Copy from the current cursor line to the following 10 lines
Y1G Copy all data from the row to the first row of the cursor
YG copies all data from the row to the last row of the cursor
Paste
P (lowercase) paste to the next line in the row where the cursor is located
P (uppercase) Paste to the previous line of the cursor
Delete Row
DD Delete the line where the cursor is located
10DD Delete the line where the cursor is located to the following 10 lines
Delete character
X (lowercase) Deletes a character after the cursor position
X (uppercase) deletes a character in front of the cursor position
Merge rows
J (uppercase) merges the row where the current cursor is in the next line
Cursor Jump
GG jumps to the first line of the file position
G jump to the last line of the file
100G jumps to the beginning of line 100th
: 100 jump to the beginning of line 100th
^ Jump to beginning of line
$ jump to end of line
Flip Screen:
Ctrl+f Front Flip Screen
Ctrl+b Turn back the screen
Find
/"String to find", press "n" to find the next match character, press "n" to look up
Replace
Save File
: W
Save and exit
: Wq
Force exit
: q!
Vim Editor Common operations