Show Menu
Cheatography

Vim Cheat Sheet (DRAFT) by

Select vim shortcuts

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Editing

d/<­*><­CR>
Delete to search
gU|gu
Switch to upper | lower
g& | :%&&
Repeat last sub globally
gv
Reselect
o
Switch selecting end
qx | q
Start | end recording macro x
@x | @@
Play macro by name | last
cgn
Replace last search under cursor (useful with n and .)
 

Movement

;|,
Repeat motion­/back
<C-­I|O>
Navigate jump history | back
`.
Navigate to last chang
mm|`m
Mark m, go to mark m
<C-­W> s|v
Split
<C-­W> c|o
Close active | all others
<C-­W> h|l
Prev|next tab
 

Vim surround

ysiw<x>
Surround w with <x>
S<x>
Surround visual selection with <x>
cs<­x><­y>
Replace <x> with <y> as surrou­nding
ds<­x>
Remove <x> surrou­nding