I want to define a global search and replace with confirmation command, something like:
command Gfr :s/<parameter1>/<parameter2>/gc
So I can type:
:Gfr foo bar
and Vim will find all occurrences of 'foo' in the document and ask for each whether I want to replace it with 'bar'.
Googling has led me to some tantalising hints that this is possible, but no definitive answer.