Mark
Mark

Reputation: 123

Intellij IDEA - display 2 spaces indent as 4 spaces

At work our project is indented with 2 spaces. Somehow they don't want to use tabs for indenting. I personally can't read code indented with 2 spaces very well and would prefer 4 spaces.

Is there anything I can do without changing the code, to improve the readability for me?

Thanks four your answers!

Upvotes: 1

Views: 1050

Answers (1)

Makoto
Makoto

Reputation: 106508

No.

A tab is something that can be openly and freely defined to be as many spaces as you want it to be, such that one tab could equal 3 spaces if you really wanted to (although I think both factions would be justified in their outrage over such an abomination).

A space is a hard-coded, explicitly defined value, and if two spaces are used, then it can only ever be two spaces.

Your only hope is to advocate - strongly advocate - for better code standards. You'll have to either extol the benefits of tabs since they can be used for variable space, or you'll have to demonstrate why having four spaces is preferable to two for readability's sake.

Upvotes: 1

Related Questions