fixed rule
fixed rule
![](https://lemmy.blahaj.zone/pictrs/image/429ac5cb-765f-40ed-890e-d948ea759019.png?format=webp&thumbnail=128)
![](https://lemmy.blahaj.zone/pictrs/image/429ac5cb-765f-40ed-890e-d948ea759019.png?format=webp)
original: https://lemmy.blahaj.zone/post/8572031
fixed rule
original: https://lemmy.blahaj.zone/post/8572031
You're viewing a single thread.
Indents should exclusively be a single tab per indent, not any number of spaces, and width should be handled by the IDE renderer, configurably, rather than baked into the code.
Tabs should be 4 spaces because it can be replaced 1:1 with "tabs".
For example...
def foo(): if bar: foobar()
vs...
def foo(): tabsif bar: tabstabsfoobar()
Put that in your code review, cowards!
Only if a person's machine is set to a tab size of four spaces. By this logic, we would need eight spaces for the people with a larger tab size of eight on their machines so they could be 1:1. Minimizing horizontal space is ideal as not everyone has huge horizontal monitor space to work with. But, everyone has infinite vertical space with scrolling.
I think they mean the word 'tabs'
oh lol, I missed that =p
If your code takes up so much horizontal space with 4-space tabs, you're putting too much on one line or indenting too deep. 4-space tabs keeps your line length manageable.
If you have to nest more than 2 layers, rewrite your code.
Or you're using four spaces per tab, just throwing that out there. =p
I'm a tab stop = 8 kinda guy 2 is just tiny looks like an accidental leading space
(this is also why using spaces for indentation is bad)
using 3 space wide tabs 🙋
although it doesn't matter to others, because it's an editor setting.
I use nano btw.
nano? I mean, really?
nano on the command line with syntax highlighting
why not nvim?
amen