views:

948

answers:

2

How do I make it so that HTMLTidy in Notepad++ only indents when I select "TextFX-->TextFX HTML Tidy-->TiDy Clean Document-nowrap"? All I want it to do is indent tags. But it also changes the Doctype, adds an xmlns attribute to the html tag, changes
tags, and probably does some other stuff to the html document. All I need it to do is indent the tags and nothing else. Is there a way to achieve this?

+1  A: 

There's a file called HTMLTIDY.CFG in <NPPInstallDir>plugins\Config\tidy that configures the Tidy operation. From what you said, I think all you'd have to do is remove (or comment out with ';') everything but the indent options, i.e.

indent: yes
indent-spaces: 2
yalestar
I tried that, and it still added the unwanted content, including some weird looking stuff around the stuff in between <style></style> and an extra meta tag.
Max
A: 

Yes, use the XML plugin for Notepad++. It has a "pretty print" feature that will probably work on HTML.

djangofan
I tried installing it and an error message came up, saying the version wasn't compatible with my version of Notepad++. My version is Unicode. I think "XML Tools" only comes in ANSI.
Max