15

So it appears on several sites that TextFX's HTML tidy is both excellent and has also not been supported since 2008.

It appears that the latest version of Notepad++ completely breaks it in fact.

Now I've got some HTML on a single line that I need to indent, etc. any replacements for HTML Tidy on Notepad++ that anyone can recommend?

Liam
  • 27,717
  • 28
  • 128
  • 190
  • 1
    I am using HTML Tidy with NP++ v6.3 UNICODE and it seems to be working just fine. It does not cope with html5 though. I notice there is a plugin called Tidy2 which claims to support html5, but I have not tried it yet. – greyman Mar 20 '13 at 23:39
  • Try tidy2 (accessible from the plugin manager) – Ujjwal Singh Jun 22 '15 at 18:18

3 Answers3

15

I use NppTidy2 plugin, it works pretty well.

Kossak
  • 1,273
  • 1
  • 16
  • 31
  • 2
    It would be better to mention the name of the plugin (NppTidy) and a link to the SourceForge project (https://github.com/davegb3/NppTidy2) instead of only linking to the discussion. The link might become invalid and thus make your answer less useful. – venerik Dec 12 '13 at 21:55
  • 4
    This seems to be a sources only release. If you need a binary, google for "notepad++ npptidy2 binary". You will eventually find a thread in the [NP++ discussion board](http://sourceforge.net/p/notepad-plus/discussion/482781/thread/2eeba3f3/) which leads to a [.zip package](https://github.com/downloads/davegb3/NppTidy2/Tidy2_0.1.zip) – Raul Pinto May 14 '14 at 08:49
  • 8
    The Plugin is in the plugin manager under the heading 'Tidy2' and works great! – Aren Jul 24 '14 at 19:41
  • 6
    Tidy2 will totally mess up any inline script elements by attempting to escape many of the characters. – Martlark Oct 08 '14 at 23:00
  • 1
    Beware: Certain HTML character entities get replaced with their unicode character when you tidy. This is regardless of the Tidy2 configuration or document encoding. For example, "’" before tidying becomes "’" ("smart" single quote) after tidying. This made Tidy2 unusable for me. The project has not been updated since 2012. – trebormf Apr 06 '15 at 15:49
  • 1
    The NppTidy2 version from bruderstein is outdated for years. An updated fork can be found here: https://github.com/geoffmcl/NppTidy2 - I edited the main post. – user136036 Jan 14 '17 at 11:24
9

For anyone else stuck on this, in the end I used this tool

http://infohound.net/tidy/

Liam
  • 27,717
  • 28
  • 128
  • 190
5

Download old version notepad++ in zip format. Copy from zip \unicode\plugins\Config\tidy to C:\Program Files (x86)\Notepad++\plugins\Config\tidy

restart notepad++ and now you have available the plug-in

Menu -> TextFX -> TextFX HTML Tidy –> Tidy: Reindent XML

Link to download old version whit the plugin http://notepad-plus-plus.org/download/v5.6.8.html

Adrian
  • 329
  • 4
  • 6
  • 1
    This seemed like a good idea, but `TextFX HTML Tidy –> Tidy: Reindent XML` did not indent my javascript properly (didn't seem to do anything). – Ryan Sep 13 '15 at 00:02