CheatSheet for Vim Key Bindings
Vim Key Bindings CheatSheet
Vim Modes:
There are three modes. It’s used for the following:
- Normal Mode: Movement, deletion and searching
- Insert Mode: Entering text directly
- Visual: Manipulating text using selection
Movement:
1. Basic navigations
1
2
3
4
5
6
7
h -> left
j -> down
k -> up
l -> right
gg -> first line of page
G -> last line of page
:number -> specified line number
2. Moving through lines
1
2
3
4
$ -> end of line
0 -> start of line
b -> previous word
w -> next word
Normal Mode
3. Editing Text
1
2
3
4
5
6
7
8
9
10
11
x -> delete character
dd -> delete line
yy -> copy line
p -> paste
u -> undo
ctrl + r -> redo
/ -> search forward
? -> search backward
:s/old/new/g ->replace all "old" with "new"
This post is licensed under
CC BY 4.0
by the author.