【问题标题】:Commenting html/django template lines in Visual Studio 2017在 Visual Studio 2017 中评论 html/django 模板行
【发布时间】:2019-08-25 11:17:25
【问题描述】:

我在 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】:

    可能有一个可用于 VS 的插件来解决这个问题,但是,我认为它本身并不支持块与行 cmets。但是,在 Visual Studio Code 中,如果您愿意在 VS Code 中进行编辑,则在“编辑”菜单上,块和行 cmets 有单独的选项,它们的行为有时会有所不同。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-08-06
      • 2017-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-13
      • 2018-03-15
      相关资源
      最近更新 更多