Practice
Drill until it's muscle memory
Pick what to drill and a kind of round, hit Enter, and go. Time attacks count goals against the clock; endless rounds get harder every five goals.
Movement
Editing
Text objects
Visual & Insert
Macros & Ex
Plugins
Roundgoals · time attack · endless
1function averageRating(reviews: Review[]) {
1 if (reviews.length === 0) return 0;
2 const sum = reviews.reduce((acc, r) => acc + r.stars, 0);
3 const avg = sum / reviews.length;
4 return Math.round(avg * 10) / 10;
5}
6
7const best = reviews.filter((r) => r.stars === 5);
8console.log("five-star reviews:", best.length);
NORMALLoading the editor…1/100.0s1:1
Fresh goals, every round
Every goal is new, built on real code from the drills you picked. Finish one at par and each command you used earns XP; what you practise comes back for review just as it starts to fade.
⌨
A practice round needs a keyboard. Read on, and play it at your computer.
What this round trains
Your stats →Finish a goal at par and each command you used gets 1 XP. Every command has 10 levels; the bar fills toward the next.
wnext wordLv 0
fjump to a characterLv 0
Aappend at the line endLv 0
bback a wordLv 0
tjump till a characterLv 0
Iinsert at the line startLv 0
Vim practice exercises, drill by drill
Each drill makes fresh goals from real code for one group of commands. New to one? Its lesson teaches it first. Want a game instead? Vim games, compared.
Movement
- hjkl + counts Vim hjkl: move the cursor without the mouse
- Words Vim word motions: w, b, e and W, B, E
- Line ends Vim f and t: jump to a character in the line
- Find in line Vim f and t: jump to a character in the line
- Line jumps Vim relative line numbers: jump with 13j and 7k
- Paragraphs Vim paragraph motions: { and }
- Scrolling Vim scrolling: Ctrl-d, Ctrl-u, Ctrl-f and zz
- Screen lines Vim H, M and L: top, middle and bottom of the screen
- Search Vim search: /, ?, n and N
Editing
- Fix a letter Vim modes: Normal and Insert mode (i, Esc)
- Append & insert Vim insert mode: i, a, I, A, o and O
- Repeat with dot Vim dot command: repeat the last change with .
- Move, then dot The Vim dot formula: one key to move, one to repeat
- Delete & change words Vim delete and change a word: dw, cw, daw, ciw
- Operator + motion Vim operators: d, c and y with any motion
- Whole lines Vim delete, change and join lines: dd, cc, D, J
- Counted deletes Vim counts: 3dd, d3w, 3p and 5.
- Case & indent Vim indent and change case: >>, =, gU and gu
- Numbers Vim undo, redo and Ctrl-a to increment numbers
- Swap letters Vim copy and paste: yank (yy) and put (p, P)
Text objects
- Word objects Vim ciw and daw: word and WORD text objects
- Inside quotes Vim change inside quotes: ci", di" and da"
- Brackets Vim change inside brackets: ci(, di{ and ci[
- Tags Vim change inside HTML tags: cit, dit and dat
- Paragraphs Vim paragraph and sentence objects: dap and cis
Visual & Insert
- Block insert Vim visual block: insert on many lines (Ctrl-v I)
- Ragged append Vim append to the end of many lines: Ctrl-v $A
- Fix while typing Vim Insert mode shortcuts: Ctrl-w, Ctrl-u, Ctrl-h
Macros & Ex
- Macros Vim macros: record with q, replay with @
- Substitute Vim ranges for Ex commands: %, ., $ and .,+3
- Sort & :normal Vim copy, move and sort lines: :t, :m and :sort
Plugins
- Surround Vim surround: ys, cs and ds
- Comments Vim comment out lines: gcc and gc