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

已回答

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

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

请先登录再写评论。