Dot with Counts

{n}. โ€” replay the change with a new count.

Keys: {n}.

Pressing a count before . replaces the count baked into the original change. So 5dw then 10. deletes 10 words, not 5.

The dot register stores the change with its count. When you press {n}., the new count replaces the original. This is rarely the first thing people learn but it's a force multiplier.

Repeat last change with count {n}
KeyNote
{n}
.
{n}. โ€” counted dot

Example: dw deletes a word. 5. deletes 5 words at the new cursor position. The original count (1, implicit) was discarded; 5 took its place.


Reference

Pattern Means
. Repeat last change as recorded
{n}. Repeat with count {n} (replaces outer count)
{n}., {m}. Each dot can have its own count โ€” they don't accumulate

Worked example โ€” 5.

Dot honors counts.

Step 1 ยท
dot.with-counts
Step 2 ยท dd ยท dd โ€” delete one line.
dd โ€” delete one line.
Step 3 ยท 4. ยท 4. โ€” repeat dd four times.
4. โ€” repeat dd four times.

A count on dot replays the change that many times โ€” even if the original change had a different count.

โ–ถ Try this in the simulator

See also: Repeat Last Change, Counts