p.enthalabs

Vim Scoops, Learn Vim Motions the Fun Way

~/vim-scoops

$./vim-scoops --learn▉

Learn vim motions with an ice-cream van.

The van is your cursor and the town is your text. Learn Vim motions the tasty way.

Try it: one quick level

Drive the van onto the customer with h j k l.

Play the full game →

How to play

Learn the basics, then you're going.

1

Pick a route

Each level on the town map teaches a small set of motions, shown as badges with what they do.

2

Drive the van

Press keys to move, with no mouse or arrow keys. The panel echoes every key you press so you can see your motions.

3

Serve under par

Reach every customer. Match the keystroke par to clear it; beat it to earn a Wizard rank.

**New to vim? Read this first**

Vim edits text with the keyboard alone. Instead of clicking or holding an arrow key, you press single keys that move the cursor precisely, such as one word forward or to the end of a line. Those keys are called **motions**, and they are what make experienced vim users fast. This game teaches them one at a time.

You're always in **Normal mode** here, so every key is a command. Put a number in front to repeat (3 j moves down three), and if a key seems to do nothing it's usually waiting for a second key, like f then the letter to jump to. The panel tells you when it's waiting.

Motion & command reference

Every motion the game teaches. Each level only shows the few it needs.

Moving

h j k l Move left, down, up, right 0^$Line start, first shop, line end w / b / e Hop forward / back / to block end W B E Same, but over punctuation too gg / G Jump to the top / bottom row f x / F x Fly right / left onto letter x t x / T x Pull up before / after letter x ; / ,Repeat the last f/t hop, fwd / back 3 j A count before a key repeats it

Editing

x Delete the character under the cursor r _c_ Replace that character with _c_ dd / yy Cut / copy the whole line dw de d$Delete to a motion (pair d with a move) p / P Paste after / before the cursor x p Swap two neighbours di"di(Delete inside quotes/brackets (da includes them) .Repeat your last change u / Ctrl+r Undo / redo

Insert mode

i / a Type before / after the cursor I / A Type at the line start / end o / O Open a line below / above cc / C Change the line / to end of line s Delete a char and start typing ciw ci"Change a word or the text inside quotes Esc Back to normal mode

Visual mode

v Highlight a range as you move V Highlight whole lines Ctrl+v Highlight a column (block) d / y / c Delete / copy / change the highlight r _c_ Replace every highlighted char with _c_ o Jump to the other end

Search

/_text_ Enter Search and jump to the next match n / N Next / previous match *Search the word under the cursor

Registers & macros

"_a_ yy Copy the line into bin a (any a-z) "_a_ p Paste from bin a q _a_ … q Record keys into bin a, then stop @_a_ Replay bin a (count works: 3@_a_) @@Replay the last routine