I'm no hero. I have Idea set up to trim trailing whitespace automagically.