HTML 4.01 严格编辑的最佳 Emacs 模式是什么?

发布于 2024-07-14 18:42:02 字数 446 浏览 8 评论 0原文

我一直在使用 nxml-mode 来编辑 XHTML。 然而,它对于标签不必闭合的 HTML4 文档效果不佳。 有人找到了编辑这些文件的好 Emacs 模式吗?

示例文档:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-gb">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Test</title>
  </head>
  <body>
  </body>
</html>

I have been using nxml-mode to edit XHTML. However, it does not work very well for HTML4 documents whose tags don't have to close. Has anybody found a good Emacs mode for editing these files?

Example document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-gb">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Test</title>
  </head>
  <body>
  </body>
</html>

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

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

发布评论

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

评论(2

追我者格杀勿论 2024-07-21 18:42:02

我发现 html 模式效果很好。 您可能还想考虑 html-helper-mode,它比普通 html-mode 有更多的功能。

I find html-mode works quite well. You might also want to consider html-helper-mode, which has a lot more features than plain html-mode.

往日 2024-07-21 18:42:02

我使用了 html-helper-mode 一段时间,但又切换回 html-mode,因为 html-helper-mode 中的缩进很有趣,而且我没有时间对其进行故障排除。 所以我也投票支持 html 模式。

I used html-helper-mode for awhile, but switched back to html-mode because the indenting in html-helper-mode was acting funny and I didn't have the time to troubleshoot it. So my vote is for html-mode as well.

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