3 ms·
>you usually can't align stuff properly using just tabs Huh? Things indented to 1 tab will align with everything else on 1 tab. Things aligned to 2 will align
by SippinLean 9y ago
>you usually can't align stuff properly using just tabs
Huh? Things indented to 1 tab will align with everything else on 1 tab. Things aligned to 2 will align with everything else at 2 tabs.
>you have to use a space or three somewhere
Why? Tabs will indent with other tabs.
>you never know if it's spaces, tabs or a combination of them in existing code
Well they should never be combined for indentation. Unless you mean using tabs for indentation and spaces for alignment, but this wouldn't create any issues. Using tabs for spacing is objectively poor form.
I open space- and tab-indented files in my IDE, they are all converted to tabs. It is always consistent.
- pvinis 9y agoOh god. I also prefer tabs, but if a file has a choice of tabs or spaces, never change the whole thing to what you prefer. Always keep it as is.
- SippinLean 9y agoGood point, in my case that's just how I work on it, git magic converts it to whatever matches the repo style before it's committed.