arduino / Arduino

Arduino IDE 1.x
https://www.arduino.cc/en/software
Other
14.14k stars 7.01k forks source link

option to enable autoformat on save #11090

Open adabru opened 3 years ago

adabru commented 3 years ago

Related: https://github.com/arduino/Arduino/issues/2202

I am getting whitespace-spam when doing git diff on a file I edited in another IDE than Arduino IDE. That is due to trailing (=invisible) whitespace being automatically removed by those other IDEs.

Arduino's autoformat function (Ctrl+T) can be used to get rid of those whitespaces. It works very well. I guess I could get used to pressing it before each save, but that will probably not work for my teammates.

Certainly the whitespace-removal can be disabled in the other IDEs (in my case Visual Studio Community & vscode); that would be a solution in my case.

But I'd rather like to have an option in the Arduino IDE to enable autoformat on save. Is there a reason to not include it?

septillion-git commented 3 years ago

My opinion here: https://github.com/arduino/Arduino/issues/6193#issuecomment-748943027