IDE mods.

How do you change the indent for auto format?

Open Preferences in the IDE File menu. Towards the bottom of the Preferences window you will see the path to the preferences.txt file. Open the preferences.txt file and look for the line "editor.tabs.size=2" (no quotes). Change the number (2) to the number of spaces for the tabs. I use 3 or 4. You have to close and reopen the IDE to see the change.


That doesn't change the indent size for autoformat, only the number of spaces when you press the tab button. To change the indent for autoformat edit the value of indent=spaces= in Arduino/lib/formatter.conf.

I don't use the Arduino IDE for editing code. I use Geany for editing and just use the IDE to compile and upload the code. You can select "external editor" in Preferences in the IDE.