Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: lvrb on Jul 28, 2016, 02:53 pm

Title: [solved] IDE (1.6.10) auto format not indenting 4 spaces
Post by: lvrb on Jul 28, 2016, 02:53 pm
Hi all,

I have modified editor.tabs.size=4 in ...AppData\Local\Arduino15\preferences.txt (Windows 7) and restarted the IDE.

Hit tab and the cursor jumps 4 spaces and after typing the new line, hitting return aligns the next line correctly - either directly underneath or indented another 4 spaces.

CTRL-T changes all the spacing back to 2 characters!

Do I have to change another preference somewhere?   
I had no joy getting this work in previous IDE's either.

Thanks in advance.

Graham.
Title: Re: IDE (1.6.10) auto format not indenting 4 spaces
Post by: pert on Jul 28, 2016, 02:57 pm
The Auto Format indentation is set in {Arduino IDE installation folder}/lib/formatter.conf line 11:
Code: [Select]
indent=spaces=2
It's very annoying that you have to set the value in two different places.
Title: Re: IDE (1.6.10) auto format not indenting 4 spaces
Post by: lvrb on Jul 28, 2016, 03:01 pm
Perfect!

Thanks ever so much for a quick reply.