Indentation: 2, 4 or x spaces?

This preferences changes over time. Let's find out how divided we are today!

2 spaces

4 spaces

other amount of spaces

tabs

Comments (5)

j's photo

just play 'pick a number' with your team and define an git hook that auto-formats your code.

tabs / spaces are mostly non relevant problems in modern software development. So it's about visual structure hence it's for humans hence it's aesthetics and this to me tends to be a bike-shedding discussion.

I let my team pick, I am old I don't care anymore about such things. Consistency is more important to me.

Show all replies
j's photo

stuff ;)

Jos Fabre fair enough. to me it's more of a statement of time. I grew up with 1 tab, I got 'corrected' to 4 spaces so it looks everywhere the same. now they like 2 spaces.

But ofc it makes perfect sense to just ask. it wasn't meant as an attack or anything.

Hipkiss's photo

My tabs are set to 4 spaces in work and just tabs at home.

Tapas Adhikary's photo

I have been using 4 spaces all while.