I have a 15" mbp (2012 non-retina) and I really don't want it to become like my old laptop and have to run it through the mains socket all the time. How can I keep my battery healthy and giving me 7hrs of battery life for the next year or two?

2012 15" Macbook Pro, i7, 8GB RAM, 750 HDD @ 7200RPM, Anti-Glare.

2012 15" Macbook Pro, i7, 8GB RAM, 750 HDD @ 7200RPM, Anti-Glare.