using the VS code plugin Amvim to quickly edit the code, memorize the following command
Command key for switch to insert mode from normal mode
I |
Enter body on the left of the cursor |
I |
Enter body at the beginning of the line where the cursor is located |
A |
Enter text to the right of the cursor |
A |
Enter body at the end of the line where the cursor is located |
O |
Adds a new line to the next line in the row where the cursor is located, at the beginning of the new line |
O |
Adds a new line to the previous line on the row where the cursor is located, at the beginning of the new line |
modifier keys
X |
Deletes the specified character at the cursor position |
Dd |
Delete the line where the cursor is located |
U |
Undo Recent Changes |
U |
Undo all changes made to the current line |
R |
Replaces one character at the cursor position |
R |
Replaces the character starting at the cursor position, changing the vi to text input mode |
. (dot) |
Repeat the last modification |
Move key in normal mode
h or [] |
Move the cursor one cell to the left |
J or [] |
Move the cursor down one cell |
K or [] |
Move the cursor up one cell |
L or [] |
Move the cursor one cell to the right |
$ |
Moves the cursor to the end of the current line |
W |
Move the cursor one word to the right |
B |
Move the cursor one word to the left |
E |
Move the cursor to the end of the word |
0 (0) |
Moves the cursor to the beginning of the current line |
Edit command
Key |
Function |
D |
Deletes the text at the specified location, coexisting in a temporary buffer. You can use the put operator (p or P key) to access this buffer |
Y |
Copies the text of the specified position to a temporary buffer. This buffer can be accessed using the put operator |
P |
Places the contents of the specified buffer above the position of the current cursor |
P |
Places the contents of the specified buffer below the current cursor position |
From normal into viewmode,2 mode using V Enter is selected by character using V in is selected according to the row, with Y copy with P paste mate D Delete
Enter visual mode from normal hold V or V
Enter command mode from normal to press A,i,o
Enter command mode from visual mode by pressing O
From for notes (Wiz)
Tools-vim Common shortcut keys