Unideal注释与NERD_注释器,注释javascript嵌入html文件

Unideal注释与NERD_注释器,注释javascript嵌入html文件,html,vim,comments,indentation,Html,Vim,Comments,Indentation,html中嵌入的一些javascript代码如下: 用vim插件NERD_注释器注释 <body> <script language="javascript"> <!--alert("hello word");--> <!--alert("hello word");--> <!--alert("hello word");--> <!--alert("hello

html中嵌入的一些javascript代码如下:

用vim插件NERD_注释器注释

<body>
    <script language="javascript">
        <!--alert("hello word");-->
        <!--alert("hello word");-->
        <!--alert("hello word");-->
        <!--alert("hello word");-->
    </script>
</body>

我希望内部javascript代码以下面的样式进行注释:

    <script language="javascript">
        //alert("hello word");
        //alert("hello word");
        //alert("hello word");
        //alert("hello word");

    </script>

//警惕(“问候语”);
//警惕(“问候语”);
//警惕(“问候语”);
//警惕(“问候语”);

如何处理?或者有更好的代码注释插件吗?

您可以使用。这就是我使用的,它支持一些混合语言高亮显示()。例如,您可以使用
gc
注释文本或
gcc
注释行,它通常会适当地检测语言。

我不知道有支持混合语言的注释插件。我会在这里提出一个问题,支持混合语言的评论会很有用。另一个例子是XSLT。XSLT周围的注释如下所示,而XSLT中使用的XPath语句内部的注释如下(:)。