Delete Cut
X ---> Delete the character of the current cursor DD ---> cut the current line (delete the current row) P ---> Paste the current line (paste the next line) p -- -capital P paste yy in current line ---> Copy current line KJHL ---> Up and down
Insert mode:
A ---> insert after cursor (equivalent to i) o ---> Insert a new row after the current row o ---> Insert a new row in the current row CW ---> Cut from the cursor position to a space or symbol (no spaces or symbols cut to the end of the line)
Cursor Movement:
0 ---> Cursor moves to wardrobe $ ---> Cursor moves to end of line/xx---> Search n Find Next ^ ---> Move to Current line, not blank position ( The position of the first character) g_ ---> moves to the current line, not the position of the blank (the position of the last character) : line number---> How many rows to navigate to: 23 cursor positioning 23 rows NG ---> N line number g uppercase, positioning to how many rows GG ---> Move to the first line, equivalent to: 1, or 1G % ---> move the cursor by symbol (the cursor is placed first on the symbol) #,*--- > Find the word at the current cursor (previous, next)
Move by Word:
W ---> Move to the beginning of the next word e ---> Move to the end of the next word. We are moving by blank, lowercase is to move the space symbol according to the program (in lowercase on the line)
Revocation and fallback revocation:
U ---> Undo ctrl+r ---> Fallback undo
Open/Save/exit/Change Files:
: Wq---> Save exit : W ---> Save : q!---> Exit Do not save
Repeat command:
. ---> Repeat last command N <command>-repeat Last command n times 3p paste 3 times 4DD repeat 4 times DD
Vim Simple Operation---learning essays