add pref for strip trailing whitespace on save

implement and close #274