Configuring HTML Tidy to indent tags and nothing else in Notepad++

Max picture Max · Jul 31, 2009 · Viewed 12.5k times · Source

All I want HTMLTidy to do is indent my HTML document's tags, but it currently also changes the doctype, adds an xmlns attribute to the html tag, changes <br /> tags, and probably does some other stuff.

How do I make it so that HTMLTidy in Notepad++ only performs indentation when I select TextFX → TextFX HTML Tidy → TiDy Clean Document-nowrap?

Answer

yalestar picture yalestar · Jul 31, 2009

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