在Emacs中创作HTML5? [英] Authoring HTML5 in Emacs?

查看:137
本文介绍了在Emacs中创作HTML5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Emacs中创作HTML5的最佳解决方案是什么?有没有一个模式可以做一致性检查?

What's the best solution for authoring HTML5 in Emacs? Is there a mode that will do conformance checking?

推荐答案

我最好的建议是使用 nxml-mode (如果您在该平台上,可以作为几个linux发行版中的软件包提供)和加载 HTML5规范页面(或任何其他来源,如果您有)的html5 RelaxNG紧凑格式规范。

My best suggestion is to use nxml-mode (available as packages in several linux distributions if you're on that platform) and load the html5 RelaxNG compact format specifications from HTML5 specification page (or any other source if you have one).

Nxml模式根据relaxNG规范即时验证xml文件,并为您提供不错的自定义功能和便捷的功能,可以更快地编写文档,比如插入终端标签等。由James Clark撰写,所以你知道作者知道他的XML。

Nxml-mode validates xml files on the fly according to relaxNG specifications and give you nice customization features and handy functions for writing documents faster like inserting end-tags and such. Written by James Clark, so you know the author knows his XML.

如果您像系统包一样加载它,您可以将其添加到 auto-mode-alist 中,好好走我刚刚设置了以下两个变量,用于自动完成,更多的文档可以在第一个链接使用。

If you load it like a system package you can probably just add it to your auto-mode-alist and be good to go. I have just set the following two variables for auto-completion and more docs is available at the first link.

(nxml-bind-meta-tab-to-complete-flag t)
(nxml-slash-auto-complete-flag t)

加载时,只需加载所需的文件,并指定html5的模式位置,通过菜单保存其位置,您应该在路上。在我提供的链接中,还有更多关于nxml-mode文档的链接。

When it is loaded, just load the file you want and specify the location of the schema for html5, save its location through the menu and you should be on your way. There are also more links to documentation on nxml-mode in the link I provided.

这篇关于在Emacs中创作HTML5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆