85 points · by splattne · 15y ago · 22 comments
If we got rid of indentation, I'd like to think it was replaced by something that took less space, not more.
This is actually a really interesting question, although I'm not sure the answers there are very helpful. I would prefer seeing the code actually indented, and then a light-gray visual guideline where the structural indentation ends, e.g.:
|<xml:something>
|<xml:what-the>
| left some extra whitespace
|</xml:what-the>
|</xml:something>Good luck with that, considering I find it hard to manually decide how to indent mixed PHP, HTML and Javascript code. I can't imagine an automatic tool having any success.
Or is the effect you want slightly different?
XCode does this in a single column using varying shades of grey:
http://i.stack.imgur.com/frCcI.png
The grey rectangles may also be clicked on to fold text. On hover you see: http://i.stack.imgur.com/EzjXW.png
And after folding you see: http://i.stack.imgur.com/wsNRR.png