5 ms·
Ok, but 2 or 4 spaces?!
by natvert 7y ago
Ok, but 2 or 4 spaces?!
- hathawsh 7y agoYes. :-) The right answer depends on the project. I really appreciate it when projects have .editorconfig files so that indentation just works. https://editorconfig.org/ https://editorconfig.org/
- Dylan16807 7y ago3 looks pretty nice in a lot of code...
- graywh 7y agoheretic
- TimTheTinker 7y agoPlease don't do that. Just... please... don't. I will have trouble controlling my frustration if I ever have to work on a codebase built with 3 spaces per indentation.
- Dylan16807 7y agoThere's zero logical reason to use a power of two, though.
- CasualSuperman 7y agoIf you use tabs, you can customize how it looks. ;)
- Sohcahtoa82 7y ago4. Also, max line width should be 120 characters. 80 is too limiting if you're using sensible variable names like you should.