Question on vi editing

If I have a text file which I am editing with vi and I perform the following editing.

:1,$s/\<green\>/blue/g

Later I decide to replace all ocurance of blue to red, then instead of writing the above editing line is there a way to recall it and work on it, instead of repeating the entire editing script?

Please suggest.

Are you using vi oder vim? In vim you can use the up and down arrows to browse through the command history. Or you can type in normal mode "q:" to edit the command history.

HTH Chris