在Visual Studio 2017中评论html / django模板行

问题描述 投票:1回答:1

我在Visual Studio中写了一个Django网站 - 但是我更喜欢{# comment #}而不是<!-- comment -->风格。问题是,Visual Studio不允许我只是改变评论风格。例如,在评论(Ctrl + K + C)之后我有这个:

    {#<style>
        body { height: 100%; }
        html { height: 100%; }
    </style>#}

我想要这个:

<!--
<style>
    body { height: 100%; }
    html { height: 100%; }
</style>
-->

这对我来说真的很令人沮丧 - 我可以告诉你如何更改它吗?

html django visual-studio visual-studio-2017
1个回答
1
投票

可能有一个可用于VS的插件可以解决这个问题,但我认为它本身不支持块与行注释。但是,在Visual Studio代码中,如果您愿意在VS代码中编辑,则在“编辑”菜单上有单独的块和行注释选项,这些选项有时会表现不同。

© www.soinside.com 2019 - 2024. All rights reserved.