Check this out: http://nategood.com/sublime-text-strip-whitespace-save