Repeat the last substitution without its flags
&
Example
Normal 0 / 1Normal 1 / 1new old
old oldCursor on line 2, column 1new old
new oldCursor on line 2, column 1Repeat the last substitution without its flags.
Vim registers
/Last search register- Characterwise
old
Repeated the substitution without its flags.
Vim registers
/Last search register- Characterwise
old
Before & after
new old
old oldCursor on line 2, column 1Vim registers
/Last search register- Characterwise
old
new old
new oldCursor on line 2, column 1Vim registers
/Last search register- Characterwise
old
Start in Normal mode. A prior :s/old/new/ replaced the first old on line 1, establishing old as the previous pattern and new as the previous replacement. The cursor then moved to line 2 before this repeat.
Details & Vim help
Example replayed in Vim
In Normal mode, & repeats the last substitution on the current line and drops its flags. Run :&& to keep the flags.