如何在Emacs中突出显示不匹配的HTML标签? [英] How can I highlight unmatched HTML tags in Emacs?

查看:144
本文介绍了如何在Emacs中突出显示不匹配的HTML标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的想抓住不平衡的HTML标签,因为我在Emacs中编辑HTML片段。例如,JSFiddle提供:





我发现还有一个 weblint的包装,但只支持HTML 4。



flycheck支持HTML检查使用整洁,但这假定当前缓冲区是一个完整的HTML页面。我经常编辑其他模板中包含的模板,所以我的缓冲区很少有一个< html> < head>

如何在不填写HTML文档的情况下突出显示不平衡的HTML标签?

解决方案

编辑:为避免并发版本,代码仅在以下情况下维护:



http://www.emacswiki.org/emacs/html-check-frag.el



请对此决定造成的任何不便深表歉意。






旧的描述是:
编辑:我做了一些bug修复,我也有一个将文件上传到emacswiki



您可以尝试以下操作。新的和肯定的越野车但是,也许比没有更好。
执行lisp代码,用html-fragment切换到缓冲区,并激活小模式html-check-frag-mode。



...和这里是过期的代码。 ...


I'd really like to catch unbalanced HTML tags as I edit HTML snippets inside Emacs. For example, JSFiddle offers this:

I've found that there's also a wrapper for weblint but that only support HTML 4.

flycheck support HTML checking using tidy, but that assumes the current buffer is a complete HTML page. I often edit templates which are included in other templates, so my buffer rarely has a <html> or a <head> in it.

How can I highlight unbalanced HTML tags, without writing full HTML documents?

解决方案

EDIT: To avoid concurrent versions the code is maintained only at:

http://www.emacswiki.org/emacs/html-check-frag.el

Please, apologize for any inconveniences caused by this decision.


The old description was: Edit: I did some bug-fixing, and I've also uploaded the file to emacswiki.

You can try the following. New and surely buggy. But, maybe it is better than nothing. Execute the lisp code, switch to the buffer with the html-fragment and activate the minor mode html-check-frag-mode.

... And here was the outdated code. ...

这篇关于如何在Emacs中突出显示不匹配的HTML标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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