Well?

Well?

Why press space X times when you can press tab X/2 times?

What shitty editor are you using where you can't press Tab to insert X spaces?

Configure your editor to interpret the tab key as a number of spaces.

Even better, allow it to change the configuration depending on the language you're developing in.

This is a question non-professionals ask thinking it matters. Here's the de-facto answer: It doesn't matter. IDEs and text editors can handle both. Follow the existing conventions. If there isn't one, just use the IDE defaults.

the only thing that matters is consistency. Pick one, and use it the same way all the time

(You)

Go be retarded somewhere else

tab
close the thread

I was under the impression that it was about personal preference. I understand whitespace doesnt matter, but how you format code matters for human eyes. My point still stands, tab is way easier to align and use.

This. Any decent editor should be able to convert tabs to spaces or viceversa to please your autism.

Privately I use tabs, at work we use spaces.
Personally I prefer tabs, but it really does not matter too much: I have turned format on save on in all my editors (Eclispe & VS Code). That way I can just type or change whatever I want and the format it on demand.
Source control check ins are also formatted.

Unless you are using a toy language like python that relies on indentation it really does not matter.

Prefer tabs, but use spaces because muh convention.

tab

...

>Why press space X times when you can press tab X/2 times?

X/2?

For a lot of people it's X/4.

2-space indenting is pretty rare. I've seen tons and tons of 3rd-party library code, and I'm not sure I ever recall seeing 2-space indenting.

The only sane answer.

Same goes for open-bracket on the same line versus the next line and other things like that.

It's quite common for JavaScript and Java. Android sources use 2 space indentation.

I've seen it frequently in Ruby, but not outside of that.

here are your ...
fucking dumb idiot
you forgot your tripcode and avatar

The only "advantage" in using spaces is that a space indent has a constant, non-customizable width. Which is actually a disadvantage.
Tab allows you to see the code in your favorite way.
Spaces are for mactoddlers and gnomeniggers who think that customizability is a bad thing.

go fmt
/thread

>go
GENERICS

Blah blah tabs for indentation blah blah spaces for alignment.

I did tabs + spaces for a while but now it's just spaces. Anything with tab characters is just too much hassle when moving between systems/editors, and if your autism can't stand 4 space tabs then you can fuck right off, I don't want you looking at my code.

Tabs for indents, spaces for alignment.
Believe that's specification for code on suckless and few others.

Use tab that inserts spaces

Tabs are retarded and only retards use them.

A tab could be a different number of columns depending on your environment, but a space is always one column.

As for how many spaces you should use, that depends on the standards used by the company you work for. It's a matter of consistency.

>go
stands for GET OUT
REEEEEE

Only code monkeys and brainlets think you have to pick one or the other.

>buttblasted C/C++/Haskel "devs"
kek

buttblasted web (((coder)))

How do I convert tabs to 2 spaces and vice-versa in webstorm?

PS Stackoverflow asked this in their annual survey - experienced developers prefer double space, noobs like tab.

I can see that as being true, I used to love me some tab.

tabs are old, spaces are new and better

you can make it so your editor makes whitespaces when you tab. You fags can't actually program anything so you argue about non-issues like this. Not unlike SJWs reading code and flagging their trigger words

>I understand whitespace doesnt matter, but how you format code matters for human eyes.
Whitespace is literally invisible by definition. If your editor doesn't manage whitespace formatting for you, you need to upgrade your editor.

>Unless you are using a toy language like python that relies on indentation it really does not matter.
Unless you are using a toy text editor that can't reformat Python indentation (and you're a barbarian that doesn't follow PEP8, but you're using a toy text editor, so I guess it's to be expected).

How do you break up your long function prototypes?

what width do you break up at ?
80? 120?

"language": {
"html": {
"spaceUnits": 4
},
"javascript": {
"tabSize": 4
}
}

Each arg on its on newline aligned by the function name. Split at 80 chars.

You still have to type backspace 4 times to delete a single indentation, which is moronic.

Tabs let other people adjust the level of indentation to whatever they want. The only reason answer is tabs for indentation, and space for stuff that relies on alignment (e.g. comments). Or basically tabs at the beginning of a line and space everywhere else.

Any decent editor has keybinds for adjusting the indent level of a line. If you need to backspace then you needed to navigate to the start of the line which is a waste of time

By making structs to encapsulate related parameters.

>2017
>not writing clean code

>I'm still using Notepad for programming
A single backspace deletes n spaces of indentation in all decent text editors written since 1976.