HTML Editor That Indents Code As Illustrated

Hi,

After a page of code gets a certain length it really seems to me to be unintelligible because the indenting breaks down, or is inconsistent.

I've purchased lots of text editors; HTML valdating text editors; WSYWIG programs.  Many promise to indent the code logically out of the box.  

Others say there are settings which, if selected in combination, will indent HTML so that it's easier to read.

Here's a pretty good illustration of the code appearance I'm going for: http://www.granneman.com/webdev/coding/formatting-and-indenting-your-html/

I'd be happy if I could even just get this much to work: "Best method: indent text/content ".

Is there any editor that you all know of that will do most of this formatting as you type?  Or, if it's not automatic, an editor whose settings you know can be selected with some simplicity to achieve this outcome.

Thanks!

OT
oaktreesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ThomasMcA2Commented:
HTML Tidy is a popular tool.

Notepad++ has several HTML Tidy functions:
EE1.jpg
0
oaktreesAuthor Commented:
Hi!

Yep.  I've seen that.  You're right.  What I'm thinking of is something that constrains, forces it to be tidy as it's being entered.  An as-you-go sort of tool, so that if I typed in:

<p>Here is some amazing text that redefines the concepts of thought and philosophy.  Touching on ideas of art, history and science, what's here is compelling and asks to be read and shared.</p>

Then, that code gets auto pushed-around into a beautiful indented layout, as illustrated in the link.  Something that applies the indenting as you go.

Sincerely,

OT!
0
Dave BaldwinFixer of ProblemsCommented:
Since reformatting the text with tags on separate lines will add hidden white space, I would never use an editor that did that.  Too often I have to go eliminate white space because it interferes with programming or layouts.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ThomasMcA2Commented:
@Dave, that intends entirely on the context of the code being developed. Since browsers remove white space from HTML, the OP's request is certainly legitimate.

@oaktrees, Notepad++ lets you assign shortcut keys to its macros and add-ins. That means you can assign whatever shortcut you want to the HTML Tidy add-in. So type your code, then press Ctrl-Shift-T or Crtl-Shift-H (or whatever shortcut you assign) and your code is instantly reformatted. That's not quite real-time, but it's pretty close.
0
Dave BaldwinFixer of ProblemsCommented:
Yes, but whitespace in the wrong place can cause PHP to fail.
0
oaktreesAuthor Commented:
Hello Dave & Thomas!

Feel grateful for the replies.  Many thanks!!

Seems what I'm driving at is a kind of as-you-type effect.  Here's my motivation: in some sense well-formatted code is a clue unto itself - a kind of topography where one can scan and see where the errors are, and how larger elements relate to each other.  More importantly: it should reveal where wrongly coded things are, and / or where those things sit.

Thomas, you're right - I could run the macro.  Seems that most of my issues arise long before I'd get to running the macro, though.  I'm making a mess of the code as I go along.  By the time I'm done I know less about how all the parts functions relative to the whole because, lacking the indentation, it's messy enough to make me feel confused: I'm not sure what I've got, even though, in many cases, it's working.  

The author of the link ( http://www.granneman.com/webdev/coding/formatting-and-indenting-your-html/ ) says that there is a way of getting most editors to handle indenting in nearly an as-you-enter fashion.  Has anyone ever done that with one of these he's mentioned, or any other editor?
0
Dave BaldwinFixer of ProblemsCommented:
My main editor is HTML-kit http://www.chami.com/ and it will auto-indent to the last indent you used when you press enter.  So does PSPad http://www.pspad.com/ .  And Notepad++ http://notepad-plus-plus.org/ .
0
oaktreesAuthor Commented:
Hello Dave!

Wow!  Awesome - great!  In HTML Kit - is there any setting, or array of setting I should select to get the outcome I'm shooting for?  Or, will it work that way pretty much out of the box?

Sincerely,

OT
0
Dave BaldwinFixer of ProblemsCommented:
I don't remember.  I've been using it for more than 10 years and I rarely change the settings for anything.
0
oaktreesAuthor Commented:
Are you using the Free one or the Pro / paid version?
0
Dave BaldwinFixer of ProblemsCommented:
I paid for it over 10 years ago.  Back then it didn't change the program version but gave you privileges to download some extra stuff.  I have both HTML-kit 292 and HTML-kit Tools which is the newer version.  I think I paid for that too.  Neither were very much money.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.