&
repeats the last :s
But it doesn't repeat with flags, e.g. a global sub:
:s/"/'/g
won't replace in the same way on consecutive lines with &
, running :s/"/'/g
on the first line here and then &
on the second
["first", "second"]
["third", "fourth"]
produces
['first', 'second']
['third", "fourth"]
the global option has been forgotten about when using &
on the second line
How can I quickly repeat last substitute command with flags?
(not @:
because I may have other commands run after :s
)