I found a useful vi reference page at http://www.ungerhu.com/jxh/vi.html, which I have copied here. The page was created by Maarten Litmaath and is maintained by James Hu. I found it a useful reference for substitution patterns, though it also has a lot of other vi information.
If you want to replace "Life's but a walking" with "Life's but a walking
shadow" you can use
:s/Life's but a walking/& shadow/
. The ampersand, in the
pattern to be substituted in place of the prior one,
references the previously found match.