Can't get HTML Tidy to indent lines

Post here if your topic is about TopStyle but doesn't fit in another TopStyle forum.

Moderator: TopStyle Support

Can't get HTML Tidy to indent lines

Postby Gorham » Thu Aug 19, 2010 11:45 am

Hello all,

I'm new to the forum, and, for that matter, to TopStyle as HTML editor. I've finally given up my HomeSite (very reluctantly) because a few things just won't work in Windows 7. I've used TopStyle for css since it was "born" all the way through 3.x Now I'm using TS4 for all my coding needs and need a tad of help.

I'm used to configuring Tidy in HomeSite and seem to be missing something with the way it's set up in TopStyle4. For now my problem is getting the lines to indent. I'm attaching a screen shot of a dummy page that's set up the way I'd like Tidy to shape it.

Help will be appreciated. Of course.

Noelle
Attachments
shape.png
A sort of example of what I mean.
shape.png (20.29 KiB) Viewed 2289 times
Gorham
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 4
Joined: Thu Aug 19, 2010 11:21 am

Re: Can't get HTML Tidy to indent lines

Postby Gorham » Fri Aug 20, 2010 11:45 am

I'm actually finding out that Tidy isn't doing anything at all to my code. It does seem to generate a report and respond to what I change. I guess I can have confidence in it.

But, spoiled coder that I am, how do I get Tidy to make my work ... uh ... tidy!?

I hope someone's "listening" and thanks again.

N.

Oh and CSS Tidy's working fine. Just to mention....
Gorham
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 4
Joined: Thu Aug 19, 2010 11:21 am

Re: Can't get HTML Tidy to indent lines

Postby recce101 » Fri Aug 20, 2010 5:20 pm

After you get the message in the Output window at the bottom, are you clicking the "Tidy" tab and selecting "Copy to active editor"?

The default HTML Tidy configuration does not appear to be set for indent. I found it helpful to print the tidyopt.dat file found in ...\user\tidy\ with Notepad and spend some time studying the comments, then use "Configure HTML Tidy..." to copy the default configuration to a "Custom" configuration and make changes there. Under the "Pretty Print" section I changed indent to yes and wrap from 68 to 80, and those changes produce the output I like.

Oh, one other thing. I use a lot of comments throughout my HTML to make it easier to find major sections, and Tidy was not putting the comments on a new line as I desired. I found that replacing the tidy.exe file in TopStyle 4 with the older tidy.exe in HomeSite 5.5 worked better. Actually I now have both files in the Program Files\TopStyle 4\ folder, renamed tidy3.exe and tidy4.exe, and either one can be selected under "Configure HTML Tidy..."

If any of that is unclear, let me know!

Ned
recce101
Rank I - Novice
Rank I - Novice
 
Posts: 11
Joined: Sun Aug 08, 2010 1:31 pm

Re: Can't get HTML Tidy to indent lines

Postby Gorham » Sat Aug 21, 2010 10:16 am

Ned, thanks so much for helping me with this. I wonder, does that mean well-formed code is no longer thought of as important? For me it's more important than ever to track my DIVs down and make sure they come out right. I really rely on Tidy to help with that.

I'm working with your suggestions. In the process, I seem to have wiped *all* my configurations from TS4! I'll work with the data files and try to create one of my liking. I moved the Tidy from HomeSite but it didn't work the same way it does in HS.

I actually went back into HS to shape my code. That's a bore! Hmmm. Make it work. I think I can... I think I can ...

-N.
Gorham
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 4
Joined: Thu Aug 19, 2010 11:21 am

Re: Can't get HTML Tidy to indent lines

Postby recce101 » Sat Aug 21, 2010 12:55 pm

I wonder, does that mean well-formed code is no longer thought of as important?

It's certainly important in my opinion. After getting the "select entire tag" feature figured out with Stefan's help and getting Tidy working to my liking, I find I can now do everything in TopStyle as easily as in HomeSite.

Here's a site that I work on often:

http://centraloahucaregivers.org

You can check "view page source" and see the way I have my HTML structured. I did that in TopStyle using the HomeSite 5.5 tidy.exe and the configuration file which I created as described in my previous message. If you'd like to PM me your email address, I'll send you the config file as well as the tidy.exe version I used.

Ned
recce101
Rank I - Novice
Rank I - Novice
 
Posts: 11
Joined: Sun Aug 08, 2010 1:31 pm

Re: Can't get HTML Tidy to indent lines

Postby Gorham » Sat Aug 21, 2010 1:30 pm

I took you up on it.

I do wonder why the default is the way it is. Did Nick leave it that way or maybe there was a reason.

Anyway, I'll be a happy camper thanks to you.

-N.
Gorham
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 4
Joined: Thu Aug 19, 2010 11:21 am


Return to General TopStyle

Who is online

Users browsing this forum: No registered users and 2 guests