Vim Cheatsheet
Modal editing essentials. Assumes stock vim; neovim is compatible.
1 credit
Modes
4 itemsEnter insert
i / a (after cursor) / o (new line below)Back to normal
<Esc> or Ctrl-[Visual
v (char) V (line) Ctrl-v (block)Command-line
: / / / ?Navigation
6 itemsLeft/Down/Up/Right
h j k lWord forward/back
w bLine start/end
0 $File start/end
gg GGo to line N
:N or NGSearch
/pattern n (next) N (prev)Edit
8 itemsDelete line
ddDelete word
dwDelete to end
d$ or DYank (copy)
yy / yw / y$Paste after / before
p / PUndo / redo
u / Ctrl-rReplace char
r<char>Change word
cwFiles / windows
4 itemsSave
:wQuit
:q / :q! / :wq / ZZSplit horizontal / vertical
:sp :vspSwitch window
Ctrl-w then h/j/k/l