DEV Community

Cover image for Never use TABS for code indentation

Never use TABS for code indentation

Christos Litras on July 05, 2021

Recently I figured out there is quite a debate regarding Tabs vs. Spaces usage for indenting code and this debate goes on for decades and still the...
Collapse
 
daemor profile image
daemor

The real reason your alignment gets messed up is not because the use of tabs for indentation (please do this), but because you use a mix of tabs and spaces for alignment (never use tabs for alignment).
To clarify: All of the variable declarations should have the same indentation level of 1, then to align the variable names you'd need ten spaces for alignment, not two tabs + two spaces like in the linked gist.

Collapse
 
jonrandy profile image
Jon Randy 🎖️

What about accessibility? Why would you want to impose your preferences on others?

Tabs vs. Spaces: It's an Accessibility Issue • Adam Tuttle

Tabs cost you nothing and give your team more options. They're the more accessible choice.

favicon adamtuttle.codes