DEV Community

Cover image for Tabs vs Spaces
Adrian Mejias
Adrian Mejias

Posted on

4 1

Tabs vs Spaces

Tabs.

Top comments (4)

Collapse
 
buphmin profile image
buphmin

I don't care xD. Really as long as it is consistent across the code base per language. At my work we use 4 spaces officially, but there is some old code that is all over.

For most languages I prefer the look of 4 spaces with the exception of js/ts I like the look of 2 since js has a lot of nesting. By look I mean the typical width of 4 spaces, I don't care whether it is a tab or a space, as long as pushing the tab button works.

Collapse
 
ghost profile image
Ghost

spaces, you can't mistake a space for a tab but you can't know if a tab are spaces. To me there should be just 1 kind of non visible character and unless you like this spaces it is. To me having tabs is like having 2 kinds of A that look the same but are different. And talking about proper modern tools, every editor under the sun can make 2 or 4 spaces with the tab key. Finally, tabs change the cursor speed when moving or deleting which is annoying.

Collapse
 
adrianmejias profile image
Adrian Mejias

i set the config to 2-4 spaces as well. :)

Collapse
 
khrome83 profile image
Zane Milakovic

I was tabs, then tab rendered as 4 spaces, then tab rendered as 2 spaces.

As I get older I want it to be smaller.

But to be honest, I develop in the conventions of the language I am working with.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more