I was searching for a way to do this, and I found nothing. The only related thread is this:
But it's only relevant for the IDE 1.0
I was searching for a way to do this, and I found nothing. The only related thread is this:
But it's only relevant for the IDE 1.0
Hi @thepirate42. As with Arduino IDE 1.x, there are two separate systems to configure:
I'll provide instructions you can follow to configure both these things so that tabs will be used for indentation instead of spaces:
The editor behavior can be configured in Arduino IDE's advanced settings:
editor.insertSpaces in the "Search Settings" field of the "Preferences" tab.The sketch code can be automatically formatted to a standardized style by selecting Tools > Auto Format from the Arduino IDE menus. It is possible to define a custom formatter configuration.
The configuration system is documented in general here:
https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-customize-auto-formatter
The standardized formatter configuration file is available from the link in that tutorial. If you would like the formatter to use tabs for indentation, use that file, but change this line:
UseTab: Never
To this:
UseTab: ForIndentation
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.