Vim is divided into three modes, normal,insert,visual.
Switch between modes:
Esc:insert cut to normal
Shortcut key switching:
I: Insert character before cursor
I: Insert character at the beginning of the current line
O: Automatically insert a row on the current line
O: Automatically insert a row below the current line
A: Insert character after cursor
A: Insert character at the end of the current line
S: Delete character after current cursor
S: Delete a row
R: Replaces the character of the current cursor with the newly entered character and immediately returns to normal mode
R: Replaces all existing characters with newly entered characters at the beginning of the character at the current cursor position
Control+u: Command cursor moves up half screen
CTRL-E roll up one line, ctrl-y roll down one line.
Delete character:
X/DL: Delete the characters under the cursor
X/DH: Delete the character before the cursor
DD: Delete a row
DB: Delete the current position to the beginning of the previous word
DIW: Delete words on the cursor (excluding spaces)
Daw: Delete words on the cursor (including spaces)
A tutorial on using Vim under Mac