expand tab spaces from 2 to 3

There is a separate setting that controls the auto format tab size. The auto formatter is configured by the file {Arduino IDE installation folder}/lib/formatter.conf. The property is indent=spaces=.

My recommendation is to copy formatter.conf to the Arduino IDE's data folder before modifying it. You can find the location of this folder by doing this:

  1. Select File > Preferences from the Arduino IDE's menus.
  2. Check the path shown on the line following "More preferences can be edited directly in the file".

The reason for storing your modified formatter.conf in that folder is so that your changes will persist through updates of the Arduino IDE, which erase all the files from the Arduino IDE installation folder. The Arduino IDE gives preference to the formatter.conf file that is found in the data folder over the one in the Arduino IDE installation folder.

You need to restart the Arduino IDE before changes to formatter.conf will take effect.

For more information on the auto formatter configuration options:

1 Like