I really like having my code all properly indented and all, but all the code generated by wordpress, like the one that appears on the header when we use wp_head(), loses all the indentation.
I think it doesn’t really matter, neither the users nor the search engines give a s**t about the code being indented or not, but when it comes to debugging, it really helps a lot.
Do you know of any plugin or option or something to fix this?
I don’t think correct global indentation is possible without massive (and inefficient) output buffering to change it.
Since you are primarily interested in this for debug purposes I suggest using some tool that will format and color-code output (of any page btw, not just those that you control).
Firebug and View Source Chart work nicely for me.
You can use a custom helper function in functions.php
Then we use this function where we need to add the tabs.
Before
After: