editing

.

Repeats the last CHANGE (any command that modified the buffer, including the whole insert-mode session that followed it). The single most-loved Vim feature — learn to structure edits so that '.' does the work for the next N occurrences.

.  (normal mode)

Variations

Keystroke Effect
3. Repeat last change 3 times
n. Powerful search-and-repeat idiom: find next match then re-apply the change

Examples

cw hello<Esc>...

Change one word to hello, then repeat on next 3 words with .

*cgnfoo<Esc>...

Search for word, change to foo, then . on each next hit

dd.

Delete this line, then delete another one

Gotcha

. only repeats CHANGES, not motions or searches — jkjk cannot be repeated with dot. Also, it uses the last register used, not always what you expect after a paste.

Related

← All Vim commands · Vim cheat sheet