NERD_Commenter的不理想评论,评论javascript嵌入html文件

Unc*_*ill 5 html vim comments indentation

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

评论了vim插件NERD_Commenter

<body>
    <script language="javascript">
        <!--alert("hello word");-->
        <!--alert("hello word");-->
        <!--alert("hello word");-->
        <!--alert("hello word");-->
    </script>
</body>
Run Code Online (Sandbox Code Playgroud)

我想用下面的样式评论内部javscript代码:

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

    </script>
Run Code Online (Sandbox Code Playgroud)

怎么处理呢?或者是否有更好的代码评论插件?

Con*_*ner 1

您可以使用tcomment.vim。这就是我使用的,它支持一些混合语言突出显示(演示)。例如,您可以使用gc<motion>注释文本或gcc注释行,它通常会适当地检测语言。