General mode available commands, including cursor movement, copy and paste, find and replace functions
ctrl+f: Screen moves down one page, quite page DOWN button
ctrl+b: Screen moves up one page, quite page Up button
0 or home key : Move to the beginning of the line
$ or End: Move to end of line
NG: Moves to the nth row of the current file, omitting n moves to the last row
GG or 1G: Move to the first line of the current file
/word: Looking down for a string with the name "word"
n: Repeats the previous find operation, such as after executing/word, pressing N to continue looking down to the next word string
: N1,N2S/WORD1/WORD2/GC: Indicates that the string is found between N1 to N2 rows, and replaced by Word2,c to indicate whether user confirmation is required before substitution, and not before the substitution if C is omitted.
: 1, $s/word1/word2/g: Represents the string to find word1 from the first line to the last row, and is replaced with Word2
x,x: X for backward deletion of a character equivalent to the DEL key, X for the forward deletion of a character equivalent to the backspace button
ndd: Deletes the N-line down the cursor, omitting n means deleting the current line of the cursor
nyy: Copy the N-line down the cursor, omitting n indicates the current row of the replication cursor
p,p: p To paste the copied data on the next line of the cursor, p instead, paste the copied data on the previous line of the cursor
u: revert undo previous action
ctrl+r: Redo Last Action
. : A decimal point, which means repeating the previous command
command line set line number
: Set nu: Display line number
: Set Nonu: Cancel line number
Basic commands commonly used in VIM