Replay the last colon command
@:
Example
Normal mode on line 1. Both lines contain old. Run no other colon commands between these steps.
old
oldCursor on line 1, column 1- :s/old/new/<CR> Line 1 becomes new; substitution remembered
- j Line 2 · still old
- @: Repeat substitution · both lines now say new
new
newDetails & Vim help
Execute the most recent command-line command again.
Repeat Ex operations that dot does not replay.
Any later typed Ex command can replace what @: replays, including inspection commands. Requires command-line history support. Dot repeats Normal-mode changes, not arbitrary Ex commands.
Run :s/old/new/ on line 1, move to line 2, then use @: without typing another colon command.
Try it in Vim
- Run :s/old/new/ on one line.
- Move to another line containing old.
- Type @: to run the substitution there.