VIM Cheat Sheet

Yeah, there are a ton of them out there, but this one is mine 🙂

Modes
------------------
esc = command mode
i = insert mode

Cursor movement (in command mode)
------------------------------
j = line down
k = line up
h = left
l = right
w = next word (5w = 5 words ahead)
e = end of word
b = previous word
0 = go to start of line
$ = go to end of line
gg = go to start of file
G = go to end of file
ctrl+f = page forward
ctrl+b = page backward

Editing (From command mode)
------------------------------
o = Insert new line after this one
O = Insert new line before this one
A = Start editing from the end of the line (append)
x = Delete character in front of cursor
X = Delete character behind cursor
dd = Delete entire line
d$ = Delete from cursor to the end of the line
30i- Esc = Insert 30 - characters

Search (From command mode)
------------------------------
/find = Search for the word find
n = Find next (forward)
N = Find previous (backward)

Help and Quiting
------------------------------
:w = save
:q = quit
:q! = quit without saving
u = undo
ctrl+R = redo
:help

Leave a Reply