Indenting source when a line is longer than the window width


Recommended Posts

All of the browsers I have seen indent source code with lines longer than the window width like this:

Here's some top level code.

spacetd7.gifHere's some second level code.

spacetd7.gifspacetd7.gifHere's some indentation. Now

the document goes onto the next line.

I think it would make it a lot cleaner if it worked like this instead:

Here's some top level code.

spacetd7.gifHere's some second level code.

spacetd7.gifspacetd7.gifHere's some indentation. Now

spacetd7.gifspacetd7.gifthe document goes onto the

spacetd7.gifspacetd7.gifnext line.

This way we'd actually be able to examine the structure of web page codes easily. And it would work just fine for web pages made with editors that indent your code like that automatically, I'd imagine - seeing they're just new lines with the same indentation. Has this been implemented in any browser?

Of course, to make this actually usable we need to have smaller tab widths etc, but I don't think it's that big of a deal. And I think it would be nice too if the horizontal scroll bar in source code view windows "snaps" to indentation if a line can't be wrapped, just to make this work better.

Does anyone know any browser that has this implemented (preferably one that works on a Mac >_>)? And if not, what does everyone think about the idea? :)

wctaiwan

Link to comment
Share on other sites

viewing the source code in web browsers doesnt format the code.. it only displays what it receives from the web server... therefore showing how the webmaster wrote the code, basically.

i dont think it would be possible, or at least very plausible, to do what you want to do within a web browser's source view

using an html editor you could do it, but youd be doing it all manually... and then youd just be doing it for yourself because anyone who uses HTML can figure things out just fine without pretty formatting........

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.