Atom: automatically removing trailing spaces

atom-editor

I've recently tried atom and have one thing against it: it tries to do the smart thing and removes all trailing spaces when I save a file – without telling me. Some editor does this but this is bad when it comes to change control. Not sure why the programmers would make this the default behavior and I couldn't find an option to disable it.

Is there a way to disable this in Atom?

Best Answer

Yep!. It's not in the core 'Settings' pane, but rather part of one of the core packages. Open up the settings view (Mac: Atom > Preferences), select 'Packages' from the list on the left, and find the whitespace package (type "whitespace" in the search box under Installed Packages:

Searching for the whitespace package

There's a checkbox to disable the auto-removal of trailing spaces under that package's settings:

Whitespace package settings

Related Question