html - Commenting html/django template lines in Visual Studio 2017
问题描述
I write a Django website in Visual Studio - but often instead of
{# comment #}
style I would prefer <!-- comment -->
. Problem is, Visual Studio doesn't allow me just to change commenting style. For example, after commenting (Ctrl + K + C
) I have this:
{#<style>
body { height: 100%; }
html { height: 100%; }
</style>#}
and I want to have this:
<!--
<style>
body { height: 100%; }
html { height: 100%; }
</style>
-->
That's really frustrating for me - could I get from you any tips how to change it?
解决方案
可能有一个可用于 VS 的插件可以解决这个问题,但是,我认为它本身并不支持块与行注释。但是,在 Visual Studio Code 中,如果您愿意在 VS Code 中进行编辑,则在“编辑”菜单上有单独的块注释和行注释选项,它们的行为有时会有所不同。
推荐阅读
- string - 尝试在循环中打印字符串时出现段错误
- javascript - forEach 用于匹配条件的对象
- node.js - 如何从MongoDB中的现有数据生成时间序列数据
- python - 使用for循环从python中的多个excel表创建子图
- dart - 是否可以使用级联对变量的 2 个属性进行操作?
- django - Django 类更新视图
- r - R summarytools dfSummary 未在 RMarkdown 选项卡中正确显示
- svg.js - 如何在特定时间线的开始和结束时调用外部方法
- autodesk-forge - 无法从 idw 保存 pdf
- blazor - 如何从下拉列表中获取所选项目?