Notepad++ HTML Tidy

2019-01-17 09:15发布

Is HTML Tidy for Notepad++ broken? None of the commands except Tidy (the first one) work. They don't show any message, even with all text selected. I really need Tidy to work, or is it just a limitation of the newest version of N++, or lack of support?

Also, the custom syntax dialog freezes whenever I select a color from the color dialog. It remains unresponsive until I click one of the bold, italic, or underline checkboxes. Is this a bug? How do I fix it?

9条回答
走好不送
2楼-- · 2019-01-17 09:47

I has this problem in Windows 7... the solution for me was to make sure that the permissions were properly set on HTMLTIDY.CFG

查看更多
ら.Afraid
3楼-- · 2019-01-17 09:49

It's actually the folder (%ProgramFiles%\Notepad++\plugins\Config\tidy) that needs to be writable, not only TIDYCFG.INI. This will allow Notepad++ to write HTMLTIDY.ERR also.

Give "all users" (or whatever it's called on your machine) full control over the folder, and everything should work fine.

查看更多
爷的心禁止访问
4楼-- · 2019-01-17 09:51

Windows 7-10 x64, Notepad++ 5.9.5 Solution:

It has to do with the libTidy.dll not being included in the current distributions.
However, it was available in earlier versions.

Solution is to download the 5.9 zip, then
copy one of the following folders:
ansi\plugins\Config\tidy or Unicode\plugins\Config\tidy
to your current Notepad++\plugins\Config folder

Also, if you install to the c:\Program Files or c:\Program Files (x86) directories, you will need to adjust the permissions on the tidy folder to allow non-administrator access

查看更多
Deceive 欺骗
5楼-- · 2019-01-17 09:51

Here's a useful default HTMLTIDY.CFG, one that pretty-prints the HTML for you:

// sample config file for HTML tidy
indent: auto
indent-spaces: 2
wrap: 72
markup: yes
output-xml: no
input-xml: no
show-warnings: yes
numeric-entities: yes
quote-marks: yes
quote-nbsp: yes
quote-ampersand: no
break-before-br: no
uppercase-tags: no
uppercase-attributes: no
char-encoding: latin1
new-inline-tags: cfif, cfelse, math, mroot,
  mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover,
  munder, mover, mmultiscripts, msup, msub, mtext,
  mprescripts, mtable, mtr, mtd, mth
new-blocklevel-tags: cfoutput, cfquery
new-empty-tags: cfelse

Taken from: http://sourceforge.net/p/notepad-plus/discussion/482781/thread/c6afffe0

查看更多
看我几分像从前
6楼-- · 2019-01-17 09:54

Am on v6.6.8 and this plugin worked well:

https://code.google.com/p/npp-tidy2/downloads/list

The ZIP pack has a dll file and a doc folder.

Copy the dll to: %ProgramFiles%\Notepad++\plugins\ and extract the contents of doc to: %ProgramFiles%\Notepad++\plugins\doc\

Restart N++ once you copy.

Usage: Plugins > Tidy2 > ...

By default, Tidy2 generates other HTML tags. You can prevent this by configuring output-xml: no and show-body-only: yes from Plugins > Tidy2 > Edit config...

More on this at: Prevent tidy from adding html tags

查看更多
小情绪 Triste *
7楼-- · 2019-01-17 09:58

I am running Windows 7 and Notepad++ 5.9. Had the same issue. To resolve:

  1. Give Full Permission for all users to the "C:\Program Files (x86)\Notepad++" folder
  2. Make a new folder called "Config" under "C:\Program Files (x86)\Notepad++\plugins"
  3. Download this file: http://jwaltonmedia.com/tools/tidy.zip. It is a zipped version of the "tidy" folder
  4. Extract the zipped folder to the "Config" folder you created above. It should create a folder called "tidy"

Restart Notepad++ and you should be set.

查看更多
登录 后发表回答