Vim语法突出显示Polymer elements

时间:2016-07-27 01:39:16

标签: javascript html html5 vim polymer

Google的Polymer元素通常在第一个注释块中包含css变量的markdown表。我注意到vim的语法突出显示总是在这里疯狂。我认为这是vim的错,但我最近发现这些评论实际上是根据这些w3 specs无效的HTML(在HTML5评论中包含--是非法的。)

这里需要改变什么? vim应该使用更宽松的语法高亮显示器,还是应该对Polymer的所有jsdoc进行大修?

enter image description here

编辑:我注意到在Atom和Sublime中突出显示问题的语法相同(但不是WebStorm)。

1 个答案:

答案 0 :(得分:0)

:help html内找到了这个:

    HTML comments are rather special (see an HTML reference document for the
    details), and the syntax coloring scheme will highlight all errors.
    However, if you prefer to use the wrong style (starts with ) you can define
        :let html_wrong_comments=1

这解决了我的问题。