Your comments

About showing spaces; I am using a plugin for Sublime (cannot recall its name at the moment and I am far away from a computer) that highlights trailing whitespace making it rather obvious where the mistake is.

It also highlights space before tab, which should never occur (the other way round is fine, though, for alignment).
Yes, good point about markdown. It does not make sense there.

A shortcut key to trim trailing whitespace on the whole file or a selection would be a very nice feature, though. I'd be using it all the time.