Work needs to use VIM for a long time, has been stupid with the mouse point, a good way, today on the Internet to write the basic use of VIM command, for later query use:
Switch to Input mode:
| Key |
Function |
| I |
Enter text to the left of the cursor |
| I |
Enter text at the beginning of the current line |
| A |
Enter text to the right of the cursor |
| A |
Enter text at the end of the line at the current line |
| O |
Adds a blank line to the next line in the current row, with the cursor at the beginning of the new line |
| O |
Adds a blank line to the top row of the current row, with the cursor at the beginning of the new line |
Text modification, non-edit mode:
| Key |
Function |
| 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 that starts at the cursor position and changes to insert mode |
To move the cursor command:
| O |
Moves the cursor to the beginning of the current line |
| $ |
Moves the cursor to the end of the current line |
| W |
Move the cursor one word to the right to the beginning of the next word |
| B |
Move the cursor one word to the left to the beginning of the previous word |
| E |
Move the cursor to the end of the word |
Search command:
| Key |
Function |
| / |
Search forward to the specified string, and then press N to search for the next |
| ? |
Search backwards for the specified string, search to press N to find the next |
VIM Basic operation