在记事本中使用 HTMLTidy 缩进空格++

发布于 2024-07-29 08:23:12 字数 80 浏览 5 评论 0原文

如何使 HTMLTidy 不将元素缩进 2 个空格的倍数(选择不换行的格式时),而是将元素缩进多个制表符(4 个空格长,但大小仅为 1 个字节)?

How do I make it so that instead of indenting my elements by multiples of 2 spaces (when formatting without wrapping is selected), HTMLTidy indents them by multiples of tabs (4 spaces long but only 1 byte in size)?

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

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

发布评论

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

评论(1

风渺 2024-08-05 08:23:12

HTML Tidy 文档 说 tidy 从不输出制表符。 但是,由于您使用的是 Notepad++,因此您可以使用 TextFX Edit -> 将空格转为制表符 将 HTMLTidy 为您提供的空格转换为制表符。 只需确保配置文件中的 indent-spaces 设置为 4 即可。

配置文件的位置将根据您安装记事本++的方式以及您拥有的版本而有所不同,但其路径可能类似于以下之一

C:\Program Files\Notepad++\plugins\NPPTextFX\tidycfg.ini
C:\Program Files\Notepad++\plugins\Config\tidy\tidycfg.ini

The HTML Tidy docs say that tidy never outputs tabs. But, since you're in Notepad++, you can use TextFX Edit -> Leading space to tabs to convert the spaces that HTMLTidy gives you into tabs. Just make sure that indent-spaces is set to 4 in your config file.

The location of your config file will vary depending on how you installed notepad++ and what version you have, but its path will probably look like one of these

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