sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
812 stars 80 forks source link

Button to toggle auto-format on/off #228

Closed trusktr closed 1 year ago

trusktr commented 5 years ago

Sometimes (f.e. when trim_trailing_whitespace is turned on), I don't want the editor to modify the file on save. Most of the time I do, but sometimes I don't.

It'd be nice if editorconfig had a button like the prettier package does, to toggle auto-format on save on/off.

Here's what the prettier button looks like in the bottom status bar:

screen shot 2018-10-24 at 1 19 22 pm

It'd be super awesome to have this with EditorConfig too

It'd be nice to do like Prettier by having the option in the plugin settings to both enable/disable the button and enable/disable auto-format.

This way, we can avoid changing the git-tracked .editorconfig inside of a project, and we get easier control of behavior.

Alhadis commented 4 years ago

IMHO, that's stepping outside the responsibilities of this package. EditorConfig isn't an auto-formatter in the sense that Prettier is; it's simply enforcing basic formatting settings at the behest of the project's author.

I can add a command for saving a file without normalisation, but I don't want to make it too easy for users to skip normalisation willy-nilly. There's a reason files are configured to trim whitespace, or trim trailing newlines, or what-have-you… 😉

sindresorhus commented 1 year ago

Closing as Atom is abandoned.