Vinegar is made by acetobacter bacteria, which means the vinegar itself is the culture for making more.
Use one gallon of vinegar for whatever you want vinegar for, and reserve the other as culture. Make another gallon of cider, and then mix with the gallon of vinegar. Leave it in a couple of demijohns full up to the shoulder, stopper the neck with cotton wool (you need oxygen to be able to get in) and put in a warm place for a couple of months to let the acetobacter do its work. You may find a jelly-like skin forming on the vinegar; this is mother-of-vinegar, and can be used to start additional batches.
To prevent it infecting any beer/wine/cider you're making, keep them well away from each other and don't make wine in a plastic container that has previously contained home-made vinegar - i.e. always use glass for vinegar, and clean and sterilise it thoroughly afterwards.