Vim Shortcuts
Essential Vim keyboard shortcuts for movement and editing
Movement
h, j, k, l # left, down, up, right
w # next word
b # previous word
0 # start of line
$ # end of line
gg # start of file
G # end of file
:n # go to line n
Editing
i # insert before cursor
a # insert after cursor
o # insert line below
O # insert line above
x # delete character
dd # delete line
yy # yank (copy) line
p # paste after
P # paste before
Visual Mode
v # visual mode
V # visual line mode
Ctrl+v # visual block mode
y # yank selection
d # delete selection
> # indent right
< # indent left
Search & Replace
/pattern # search forward
?pattern # search backward
n # next match
N # previous match
:%s/old/new/g # replace all
:%s/old/new/gc # replace with confirm
File Operations
:w # save file
:q # quit
:wq # save and quit
:q! # quit without saving
:e filename # edit file
:bn # next buffer
:bp # previous buffer