Last Updated: February 25, 2016
· thinkclay

Remove trailing white spaces on save in ST3

Just discovered this and thought I would share:

Update User Preferences with this:

"trim_trailing_white_space_on_save": true,
"ensure_newline_at_eof_on_save": true

and enjoy life!

4 Responses
Add your response

This also works perfectly in ST2 - it's the way I roll with my editor, always :D

over 1 year ago ·

Adding a newline at the end of every file kills me inside though. I don't know why, but it bothers me.

over 1 year ago ·

@gevans: You need a newline at the end of the file to be able to easily omit file contents from within the Terminal. For example:

cat ".ruby-version" >> .gitignore

over 1 year ago ·

@liquid I'm suddenly not bothered by this anymore.

over 1 year ago ·