vscode-wpilib icon indicating copy to clipboard operation
vscode-wpilib copied to clipboard

Code Templates Use 2 Instead of 4 Space Indents - Is there a way to change this?

Open tylertian123 opened this issue 6 years ago • 1 comments

When my team and I switched from using Eclipse with the extensions to VS Code with the new extension, I was quite disappointed and annoyed when I realized that the code templates for a new robot, commands, subsystems and etc now have an indentation of 2 spaces instead of 4.

I've heard many reasons to use 2 space indents instead of 4, but this is more than a question of personal preference. The old Eclipse extension used indents that were 4 spaces wide, and therefore all the code of our team was written with 4 spaces, including past seasons' code and libraries; not to mention that the default for Visual Studio Code is 4, and even the build.gradle in robot projects use 4 space indents. I find it really annoying to have files that are indented differently in the same repository.

Therefore, I think it would be really nice if there were an option to change the size of these indents so that teams can easily use whatever they prefer, so that the indentation stays consistent with other code, and that we don't have to run a shell script for every new file just to change the indentation.

tylertian123 avatar Dec 21 '18 03:12 tylertian123

There definitely will not be time to make a change like this for the season. We can look into it next summer, however because the formatting for the templates are now driven by our coding style for wpilib itself, it would be unlikely to be implemented.

ThadHouse avatar Dec 21 '18 03:12 ThadHouse