Indentation in source files KiCad7->8


I have installed Kicad8 yesterday. I found TAB indentation in source files of my project instead of <2*SPACE> after saving the project in Kicad8. What is the reason for that? Is the TAB a part of development, so indentation is deprecated?

Both tabs and spaces are just indentation. I guess a single tab takes up less file space then two spaces. And with a small PCB file of around 50k lines and an average indent of 2 that saves about 100kB of disk space.

Also, Tabs are better for indentation then spaces. Not only for disk space, but also for less typing (reformatting moved blocks etc). With tabs you can also set the visual indent in your editor (Used t be mostly 8 spaces 20+ years ago, but now often the default is 4 spaces per tab).

But can you explain why it is even worth mentioning? Even diff tools generally have settings to ignore whitespace differences.

I am just wondering if the TAB indentation is intended for future use also eg. for KiCad 9.
My usage of the KiCad is very specific and the usage of TAB leads to update of my scripts which are checking my project on the fileserver.
I would like to know if there is a possibility that the TAB indentation can be change in the “near” future again. I need to plan also future update of KiCad in my organisation but I do not want to update scripts on servers to often.

Yes. We now have an auto-formatter that is going to help to make the files more consistent going forward.

I would recommend such things ignore whitespace in general.

1 Like

Sounds good to me. For my usage is the text format of project files the biggest advantage of KiCad (but the rest is also fine :smiley: )

yes, need to correct my programming behavior :slight_smile:

Couldn’t resist: