Vim: The text editing tool vi is currently used, the powerful vim has three modes, which have different effects in different modes. command mode: input mode, and input mode: move the cursor to the last line using the h, j, k, l delete operation in command mode... information & n
Vim: text editing tool
Vi is currently used, relatively powerful
Vim has three modes
Different modes have different functions.
Command mode-input mode input I key conversion
Input Mode-last line mode input: to last line
Use cursor movement in command mode
H, j, k, l
Delete operation
X cursor in one character at a time
D. delete a single dd in combination.
Ndd delete row n
De deletes a word.
Dw deletes a word with spaces
10, 21 d delete 10th rows to 21 rows
. Row where the current cursor is located
. 8 is to delete from the row where the cursor is located to 8th rows.
Copy and paste
Y replication
Yy copy a row
Copy 3 rows in 3yy
P paste
You can use u to cancel an error once in lower case.
Capital u undo all operations at a time
Ctrl + r undo
R single character replacement
. Repeat the previous operation
Visual mode: v V
Move text: d, p
This article is from the "Xu Shuai" blog