Make remove trailing spaces configurable

To keep trailing spaces use the command "KeepTrailingSpaces 1", to go
back and auto remove trailing spaces just call "KeepTrailingSpaces"