Use of the editor:
ESC Command mode
A insert mode (rear insert)
I insert mode (front insert)
o Open a new line below the current line and enter insert mode
O open a new line above the current line and enter insert mode
: Edit mode
V Visual mode
Command mode:
K Move Cursor up
J Move Cursor Down
H move the cursor to the left
L Move Cursor Right
$ cursor moves to end of line
B cursor moves to the beginning of the line
GG cursor moves to the beginning of the content (first line)
G cursor moves to the last line
W cursor moves to the first character of the next word
b The cursor moves to the first character of the previous word
R replacement Mode (replaces one character)
R replaces n characters
X Delete one character
NX removes n characters n-integer
YY Copy a row
NYY Copy N rows
P paste below the current line
P paste to the top of the current line
DD Delete (cut) a row
NDD Delete (cut) n rows
Edit mode:
:/search Searching for search contents
N Find Next
N Find Previous
:%s/search/replace/g Full Text replacement
: n1,n2s/search/replace/g Specifies the number of rows to replace
: W Save
: w filename saved as filename
: Wq Save Exit
: Q Do not save exit
In the visual mode:
Aaaaaaaaaaaaa
Aaaaaaaaaaaaa
Aaaaaaaaaaaaa
Aaaaaaaaaaaaa
Aaaaaaaaaaaaa
Vim's editor