Learn Vim / Second comma's the charm — vim

Second comma's the charm — vim

The answerCanonical keystrokes: f, ; D.

Try it on a real buffer

Delete from the SECOND comma to the end of the line. Find the first comma with f,, repeat the jump to the second with ; (semicolon), then delete to end of line with D.

keep alpha, keep beta, cut gamma, cut delta

Canonical solution: f, ; D · par: 4 keystrokes (vimgolf rules — every keypress counts).

Why it works

After an f or t jump, ; repeats it forward and , repeats it backward — so f, ; ; walks comma to comma without retyping. Pair with an operator or D for precise line surgery.

Reading about keystrokes doesn't build keystrokes. Try this in a real vim buffer right now — the “Second comma's the charm” mission takes about a minute.

Practice free — no signup →

Keep going