Skip to content

Arduino Expand tab to 4 spaces instead of 2

Amongst other annoying things, the Arduino IDE defaults to expand tabs with 2 spaces. To change that, go to (under Win7): User -> AppData -> Roaming -> Arduino

Open up preferences.txt and look for “editor.tabs.size=”, change that to 4 and restart arduino

According to this page:, you should only edit this file when Arduino is not running because Arduino IDE automatically restores the preferences on exit (um.. why the hell…)

Posted in Arduino. Tagged with , .