An Introduction to Vim
Alex LaFroscia @alexlafroscia
Manipulating the File
// Basic motion
h : move right
l : move left
j : move down
k : move up
// Jumping
w : beginning of next word
e : end of next word
b : beginning of previous word
ge : end of previous word
% : jump to matching symbol
// Moving Faster
2h : move 2 characters right
4w : move to the front of the 4th word
// Basic Ops
x : delete
r : replace (single character)
c : replace selection
// Undo
u : undo one step
ctl-r : repo one step
// Moving Text Around
d : cut
y : copy (yank)
p : paste after (similar to a)
P : paste before (similar to i)
// Other
/ : search in file
// Insert Mode
i : insert "under" cursor
a : insert "after" cursor
I : insert at beginning of line
A : insert at end of line
o : insert on next line (below)
O : insert on previous line (above)
// Visual Mode
v : regular selection
V : line selection
opt-v : block selection
// Leaving a Mode
esc : back to normal
Controlling the Editor
// Quitting Vim
:q : quit
:qa : quit all
:qa! : force quit all
// Save a File
:w : save
:wq : save and quit
// Other stuff
:help __command_name__
What sets Vim apart?
// Movement
h : move right
l : move left
j : move down
k : move up
// Jumping
w : beginning of next word
e : end of next word
b : beginning of previous word
ge : end of previous word