Highlights
关注


投票已结束

投票

How many spaces per tab do you prefer?

2
17%
3
12%
4
59%
6
4%
8
5%
Other (comment below)
3%
6419 个投票

Ismaeil AlJaberi
Ismaeil AlJaberi 2024-10-2
17
Andreas Brenner
Andreas Brenner 2024-9-23
Tabs have no coversion rate to spaces do they? They suppose to end at the same point for each line. This is not the same. Please don't do that.
goc3
goc3 2024-9-23
Traditionally tabs have been equal to four spaces. However, modern code editors (including the built-in MATLAB editor) allow the user to modify how many spaces their tab key inserts (and whether or not tabs are filled with spaces).
While the poll results do indicate that about 3/5 users prefer the four-space setting, there are plenty who like to customize it otherwise. I figure that it is a good thing for the user to have control over such settings.
Ganishk D
Ganishk D 2024-7-1
Used to python's standard 4 spaces indentation.
Alexander Denman
Alexander Denman 2024-6-13
I use tabs, not spaces
Bo Miller
Bo Miller 2024-4-30
I prefer 5. 4 can be a bit hard to differentiate from other formating, and 6 takes up too much space; though space considerations do fee a little arbitrary considering that most developers I've encountered prefer to use at least 2 monitors. I do try to keep to the python style guid as far as line width, but I sometimes wonder if we really need to be concerned about people reading code on legacy monitors.
Stephen McLaren
Stephen McLaren 2024-10-7
Got to be honest, I thought 5 was the standard.... shows how much attention I pay!
Christian Schröder
Christian Schröder 2024-4-30
In my own projects, I find that four is the most visually pleasing, a good balance etween readability and not wasting screen real estate. That said, I like that MATLAB allows you to choose for yourself.
Christopher Stapels
Christopher Stapels 2024-4-29
Used to be 5, but that wasnt even a choice. 2 since I learned Python
David
David 2024-4-29
Obligatory Silicon Valley reference :)
Rik
Rik 2024-4-28

I once followed a course where the instructor argued for 8 spaces AND a limit of 80 characters per line. His reason was that it forces you to reconsider any code that requires 3 levels of indentation, since that is really ugly. There is something to that reasoning, but I don't think it makes sense outside of a teaching context.

DGM
DGM 2024-4-28
Depends. Usually 4. In something like openSCAD, there tends to be a lot more indentation, so I'd rather use 2, or change my indentation style.
Definitely never 8, and definitely never spaces.

标签

尚未输入任何标签。