This article is from the Bicycles FAQ, by Mike Iglesias with numerous contributions by others.
From: Alan C Fang <email@example.com>
Date: Tue, 20 May 1997 12:27:07 -0700 (PDT)
leave the derailler on the bike. first, check the orientation of the old
spring so that you will know how to put in the new one. taking out the
old spring shouldn't be too hard- just yank on it. if you can't do it,
use the reverse of what i'm about to tell you for getting the new spring
one end of the spring is open. that open end has to hook onto this bar on
the derailler body. to get it up and over this bar, get a piece of brake
or shifter cable (or a strong string) and bend it in half, putting a kink
in it. put the spring inside the derailler in the proper orientation.
thread this kink through the derailler where the bar is, making it go on
the side of the bar opposite the open side of the spring's hook. hook the
kink in the cable around the open end of the spring, and yank on the
cable. that should pull the open end of the spring past the bar. now you
can stuff the tip of the hook back over the bar, thus hooking the
derailler spring onto the bar.
the closed end of the spring is much easier to get in. what i use is a
bottom bracket tool, the kind with the pins for adjusting older style
bb's. use one of the pins to grab the closed end of the spring, and lift
it up so that it hooks onto that [other thing]. you are done. voila! or
as a dyslexic would say, viola!