A practical Vim cheatsheet of motions, edits, search, and file/window commands you’ll use constantly—no trivia, just muscle memory.
Vim gets “hard” when you try to memorize everything at once. Don’t. Learn the 20% you’ll use 80% of the time, then layer on power moves when they solve real problems.
This is the cheatsheet I actually rely on.
Most Vim actions are:
d + w → dw deletes a word)3w, 2dd)Common operators:
d deletec change (delete then enter insert)y yank (copy)> / < indent / unindenti, a, o)v, V, Ctrl+v)When in doubt: press Esc.
h j k l: left / down / up / rightw / b: next / previous worde: end of word0 / ^ / $: start of line / first non-space / end of linegg / G: top / bottom of file{ / }: previous / next paragraph (blank-line separated)f{char} / t{char}: jump to (or before) a character on the line;: repeat last f/tx: delete char under cursordd: delete lineD: delete to end of linedw / de / db: delete word (forward / to end / backward)cw: change wordcc: change lineC: change to end of lineci" / ci' / ci( / ci[ / ci{: change inside quotes / parentheses / brackets / bracesdi" / di( / etc: delete inside …yi" / ya( / etc: yank inside / around …u undo, Ctrl+r redoi: insert before cursora: append after cursoro / O: new line below / above (and enter insert)/text: search forwardn / N: next / previous match* / #: search word under cursor forward / backward:%s/old/new/g: replace all in file:%s/old/new/gc: replace with confirmation:noh: clear search highlightv: character-wise selectionV: line-wise selectionCtrl+v: block selection (columns)Then:
y yank selectiond delete selectionc change selection> / < indent / unindent selectionyy: yank linep / P: paste after / before cursor"+y: yank to system clipboard (if Vim has clipboard support)"+p: paste from system clipboardBuffers (open files):
:e file: open file:w: save:q: quit:wq: save + quit:q!: quit without savingSplits:
:split / :vsplitCtrl+w then h/j/k/l: move between splitsCtrl+w then =: equalize split sizes.: repeat last change (insanely useful)q{a} start recording into register aq stop@a play macro, 10@a play 10 timesThese are the patterns that unlock everything:
d + motion: deletec + motion: changey + motion: yankv + motion + operator: select then actIf you only learn one thing this week, learn operator + motion and commit . to muscle memory. Everything else becomes incremental instead of overwhelming.
No comments yet
Loading comments...