Go to SublimeText 2 > Preferences > User Settings. This should open your User Settings as a JSON file. Add the following to your file:
"trim_trailing_white_space_on_save": true
Go to SublimeText 2 > Preferences > User Settings. This should open your User Settings as a JSON file. Add the following to your file:
"trim_trailing_white_space_on_save": true