1. Move the cursor
hjkl
2. Delete characters
x
3. Inserting characters
i
4. Delete a word
de
Do not include spaces
dw
5 Remove from cursor to end
d$
6 Deleting an entire row
dd
adding a value before can delete more than one example 2DD delete two lines 2de Delete two wordsUndo Command
u
Undo an entire row
U
Restore Undo
CRTL+R
Paste
- P
Replace word into Insert State
cw
The instructions used in C and D are similar in that all are digital +c+ (e W $ D) equivalent to d+a combinationtransfer to the beginning and end of the file
shift+g
shift+G
Display text information
CTRL+g
Looking for a fixed character/forward lookup? Reverse lookup n Then the previous forward lookup shift+n then the previous reverse lookup
/
?
n
- Shift+n
% = pair% pair Bracket
%
Methods for correcting errors
s/old/new/g
Replace a character in a line
:s/old/new/g
Replace the first matching character of a row
s/new/old<enter>
Replace all characters between the two lines
:#,#s/old/new/g
Replace all characters between documents
:%s/old/new/g
Ask the user when the full text is replaced
:%s/old/new/gc
Execute external commands within VIM
:!ls
Save the file as a file with the specified file name
:w FILENAME
Save the contents of the specified section
:#,# w TEST
Insert the contents of the specified file
r FILENAME
Opens a new row and enters input mode
o or O
Jump to the end
$
Jumps to the end and enters input mode
A
Replace
R
Find ignores case
:set ic
Find highlighting
hlsearch
Find matches first display location
incsearch
Vim Command Collation