vim
basics
Quick start
In normal mode (Esc
)
- Insert mode
i
- Move cursor
h
j
k
l
- Undo
u
- Redo
Shift
+R
- Find
/
- Find next
n
- Find previous
N
- Find next
- Save
:w
- Quit
:q
- Quit without saving
:q!
- Delete all
gg
dG
Additional
In normal mode (Esc
)
- Delete right
x
- Delete left
X
- Delete line
dd
- Move to the beginning of the next word
b
- Move to the beginning of this or the previous word
w
- Move to the end of this or the next word
e
- Move to the start of the line
0
- Move to the end of the line
$
- Move to the start of the document
gg
- Move to the end of the document
G
- Visual mode
v
- Open new line below and go to insert mode
o
- Open new line above and go to insert mode
O
- Go to corresponding parenthesis
%