Atom: Disable auto-formatting on save

If you have the atom-beautify package installed, you can enable/disable auto-format on save for each supported language separately:

PreferencesPackagesatom-beautify → scroll waaay down to Language Config - LangXYZ - Beautify On Save (with LangXYZ being the language configured).


If you don't have extra packages installed, it might the whitespace package, which comes with Atom and is enabled by default: PreferencesPackageswhitespace

You can either click Disable and be done with it (I did :-)), or you can disable the package selectively via entries in your config.cson file, as documented on the package page itself.


"By default, JSFormat's Format on save is set to true."

If you install the JSFormat, you can disable or remove it.

With Atom v1.6.1, I remove JSFormat, and it won't auto format when saving JavaScript files.


By default, Atom cleans up the whitespaces when you save a file.

To prevent this default behavior, you have to follow these steps:

  • Go to Preferences ... (Command + ',' in macOS)
  • Click on Open Config Folder
  • Open config.cson
  • Append the following lines to the bottom of it:

whitespace: removeTrailingWhitespace: false

Tags:

Atom Editor