G jump to end of file
GG jumps to the first line of the file
Number 0 jumps to the beginning of the current line
$ jumps to the end of the current line
Ngg N is a number that moves to the nth row of a file, such as a 11gg row that can be moved to line 11th,
YY copy when moving forward
Nyy N is a number, the copy cursor starts down n rows
p/p p Pastes the copied data to the next line of the cursor, and p is pasted to the previous line
DD Delete the line where the cursor is located
NDD n is numeric, delete cursor starts down n line
U Redo Previous Action
Ctrl+r Restore the previous operation, used in conjunction with u
DGG delete the current line to the first row
DG deletes the current line to the last row
I insert text at the current cursor position
A prompt insert text at the next word in the current cursor
o Insert a new row at the next line in the row where the current cursor is located
Ees exit edit mode, return to normal mode
/oldboy starts at the cursor position and looks down for a string named Oldboy
Oldboy start at the cursor position and look up for a string named Oldboy
N starts from the cursor position and repeats the previous search action down
N starts from the cursor position and repeats the previous search action up
:%s/a/b/g Replace all contents of A with B
: W Save File
: Q exit
: Wq Exit Save
: wq! Launch and force save,! for mandatory meaning
: q! Force quit, do not save
: Set NU Displays line number
This article from the "12216950" blog, reproduced please contact the author!
Vim shortcut keys