You apparently don't line up your equals signs when declaring multiple variables. Or, if you do, you've never changed the tab width in your editor and seen how much it screws things up. :P
I tend to follow this simple rule: tab indents, and space lines up.
If you have a brace or other bracketing delimiter split over multiple lines, indent by one tab. If you're just lining some things up, use spaces... but still use tabs up until the point where you would have started the line were you not lining things up.
This way everyone can have their own tab settings but the lining up still works.
Discussion (7)
You apparently don't line up your equals signs when declaring multiple variables. Or, if you do, you've never changed the tab width in your editor and seen how much it screws things up. :P
Claims inspired by this comment
Aligning code is a bad ideaI tend to follow this simple rule: tab indents, and space lines up.
If you have a brace or other bracketing delimiter split over multiple lines, indent by one tab. If you're just lining some things up, use spaces... but still use tabs up until the point where you would have started the line were you not lining things up.
This way everyone can have their own tab settings but the lining up still works.
Claims inspired by this comment
Using both tabs and spaces for code indentation is a bad idea.I agree with Ryan :)
The claim is formulated well, but let me reformulate:
Using tabs to indent code lets the reader decide how screwed up the code displays.
Ryan is right about the tabs making the = line up poorly, but if the user wants to do that then using tabs will allow it, so the claim is still true.
It just means that this doesn't necessarily make it better to use tabs.
yes it does. No I don't want them to be able to do that... Were is my pdf compiler! jk
I also agree with Ryan.