Code style: how to enforce tabs but allow each dev to have their own tab size?

Answered

I want to commit my project settings to my repository and I want to enforce tabs instead of spaces. This is easy enough.

But I don't want to enforce a tab size. Some folks may want to code seeing a tab size of 4 and others may want to code seeing a tab size of 2.

Yet I cannot seem to find a way to do so.

Is there any way to override project tab size with personal local tab size?

I've also posted this to StackOverflow: https://stackoverflow.com/questions/77917499/android-studio-code-style-how-to-enforce-tabs-but-allow-each-dev-to-have-their

0
1 comment

You can try to create an .editorconfig file and override only “Use Tab Character” option

Please see https://www.jetbrains.com/help/idea/editorconfig.html on how to enable editor config

and https://editorconfig.org (option “indent_style ”) on how to configure it

Then you can share .editorconfig file with your team members

0

Please sign in to leave a comment.