In the shell, remember that some of the commonly used VIM commands are more effective when operating.
Cursor movement
h, j, k, l, h # means left, j means down, k means right, l means up
Ctrl f #Previous
Ctrl b #Next page
w, e, W, E # jump to the end of the word, lowercase includes punctuation
b, B #Jump the cursor forward in units of words, lowercase contains punctuation
O #Open a new line
^ #Start of a line
$ #End of a line
gg #First line of the document
[N] G #The Nth or last line of the document
search for
/ pattern #search (non-insert mode)
? pattern #search back
n #cursor reaches the previous target of the search result
N #cursor reaches the next target of the search result
window
: split #Split a window horizontally
: vsplit #Split a window vertically
: close #Close the window
Ctrl W #Switch window, h to the left window, j to the lower window, k to the upper window, l to the right window
Insert mode
i #insert before the cursor
I #insert into the beginning of the line
a #insert behind the cursor
A #Insert to the last position of the line
o, O #New line
Esc #Close insert mode
edit
r #Replace a character under the cursor in insert mode
J #Merge the next line to the previous line
s #Delete a character under the cursor, the cursor is still in the line
S #Delete the line where the cursor is, the cursor is still on the line, different from dd
u #Undo the previous operation
ctrl r #Restore the previous operation
. #Repeat the last command
~ #Convert to uppercase
[N] >> #One line or N lines move one tab to the right
[N] << #One line or N lines move one tab to the left
shut down
i #insert before the cursor
I #insert into the beginning of the line
a #insert behind the cursor
A #Insert to the last position of the line
o, O #New line
Esc #Close insert mode
Cut and copy
dd #Delete a line
dw #Delete a word
x # delete the last character
X #Delete the previous character
D #Delete the last character of a line
[N] yy #Copy one line or N lines
yw #Copy a word
p #Paste
Visual mode
v #Select one or more characters
V #Select a line
Excerpt from: https://www.sheetgit.com/sheets/9e58d539d616e9bc68b8d729957ad0dc
Vim command related