1. Three modes
(1) Command mode:
Just start vim and enter command mode, at which point the keystroke will be treated as a command.
Here are a few common commands:
I switch to insert mode to enter characters.
x deletes the character at which the current cursor is located.
: Switch to Baseline command mode to enter commands at the bottom of the line.
(2) Input mode
Press I in command mode to enter the input mode.
In input mode, you can use the following keys:
Character keys and shift combinations, enter characters
Enter, enter, line break
Back SPACE, backspace key, delete the previous character of the cursor
DEL, delete key, delete cursor after one character
Arrow keys, moving the cursor in text
Home/end, move cursor to beginning/end of line
Page Up/page down, up/down page
Insert, toggle cursor to input/Replace mode, the cursor will become a vertical bar/underline
ESC, exit input mode, switch to command mode
(3) Bottom-line mode
Press: (colon) in command mode to enter the baseline command mode.
The bottom line command mode can enter commands for single or multiple characters, and there are many commands available.
In the baseline command mode, the Basic command has (the colon has been omitted):
Q Exit Program
W Save File
Press the ESC key to exit the bottom command mode at any time.
2. Basic operation
Paste: Command mode P
Copy: yy in command mode
"Vim" vim learning