Eden Chen

Basic Essential vi vim Commands

Eden Chen August 01, 2014

Basic Essential vi vim Commands

i = insert
O = insert line above
o = insert line below
esc = edit mode
h = left
l = right
k = up
j = down
yy = copy
p = paste
u = undo
J = join lines
w = next word
b = last word
( = jump to last sentence
) = jump to next sentence
^ = beginning of a line
$ = end of a line

Example combinations:
d + b = delete last word
5 + p = paste 5 times

Exit commands:
:q = quit without saving
:q! = quit without saving if changes have been made
:wq = quit and save changes

Weekly musings delivered to your inbox