Re: Tab = four
In terminals and printers, a TAB character classically moves to the next divisible-by-8 position.
Traditionally, tabs were settable, on mechanical typewriters. That mechanism dates back at least as far as 1900 (Hillard patent). In the era dominated by mechanical typewriters, the first tab position was often set to 5 or 6 spaces for start-of-paragraph indentation.
ISO 6429 includes control codes for setting tab stops. I don't know offhand of any terminal that implemented them.
Every-8th-position is a convention that came later, perhaps because it's a good divisor for the 80 columns of the common 80-column punch card, though the author of the page linked above suggests it's because calculating the next fixed tab stop is simpler in binary if it's congruent to 0 modulo 8 (add 8 and mask the three low bits). Both justifications could apply, of course.
It's also perhaps worth noting that ASCII codepoint 9 was originally defined as "HT/SK", the "SK" meaning "skip", a control function for card readers. See e.g. the third page of Smith, "New American Standard Code for Information Interchange".
This wileness has forced the coding standards in my workplace to degree that only spaces shall be used for indentation...
The different-settings-for-horizontal-tab problem existed long before IDEs were available on most systems. I well recall problems reading code formatted with tabs, and particularly with tab-and-space combinations, in the 1980s on UNIX systems where most developers used vi or emacs1. vi, of course, was infamous for aggravating the problem when autoindent was set.
Since it's impossible to know what anyone else's editor will do when displaying tabs, I've always adhered to the spaces-only school. Yes, for much indentation you can get away with tabs-only; but that falls down if you want to align text on anything other than a tab boundary, as some people like to do when splitting long statements, for example.
1emacs is not so much an IDE as a shell with a really ambitious command-line editor.