Thursday, March 12, 2015

Disable "Remove trailing whitespace" defaults in Atom editor


If you are using Atom.io text editor, you might have noticed that it automatically removes all the trailing white space on your code.

This can be very annoying when you are working on changes, and the formatting changes are getting mixed with logic changes.


To disable this, update the config.cson file in your home directory :


cd ~/.atom
vi config.cson

...
'global':
  'whitespace':
    'removeTrailingWhitespace': false

...

After restarting your editor app, you should be all set.

1 comment:

  1. Note that in Atom 1.0 this is at the same level as 'core' under '*' rather than under 'global'

    Also you don't need the ' 's around whitespace

    i.e.

    whitespace:
    'removeTrailingWhitespace': false

    is all you need

    ReplyDelete