配置 HTML Tidy 以缩进标签,而在记事本中不做任何其他事情++

发布于 2024-07-30 18:34:54 字数 272 浏览 3 评论 0原文

我希望 HTMLTidy 做的就是缩进 HTML 文档的标签,但它目前还更改 doctype,向 html 标签添加 xmlns 属性,更改
标签,并且可能会执行其他一些操作。

如何使 Notepad++ 中的 HTMLTidy 仅在选择 TextFX → TextFX HTML Tidy → TiDy Clean Document-nowrap 时执行缩进?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不乱于心 2024-08-06 18:34:54

plugins\Config\tidy 中有一个名为 HTMLTIDY.CFG 的文件,用于配置 Tidy 操作。 从你所说的来看,我认为你所要做的就是删除(或用“;”注释掉)除缩进选项之外的所有内容,即

indent: yes
indent-spaces: 2

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
属性 2024-08-06 18:34:54

是的,使用 Notepad++ 的 XML 插件。 它有一个“漂亮的打印”功能,可能适用于 HTML。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文