Atom: Disable auto-formatting on save

atom-editor

I have a project I started with Sublime and/or WebStorm, and now I want to switch to Atom.

The problem is whenever I save, the whole file gets reformatted and that is a big mess for git, which shows mostly all lines being modified.

I want to disable auto-format on save. Is that possible?

Best Answer

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.

Related Question