我正在使用 HTML 块,例如{% block content %}
经常使用,但必须输入括号和百分比符号很麻烦。有没有捷径或其他方法可以自动执行此操作?
到目前为止我刚刚发现这个:PyCharm 中有插入 {%%} 的快捷方式吗? https://stackoverflow.com/questions/58609248/is-there-a-shortcut-to-insert-in-pycharm没有好的答案。
有一个实时模板 https://www.jetbrains.com/help/pycharm/using-live-templates.html for {% code block %}
.
-
Press Ctrl + J (or go to Code
>
Insert Live Template
).
-
开始打字block
(模板的名称)来过滤列表。
-
Press Enter (or click) after selecting the name from the list, and the template is inserted.
-
您可以找到block
模板位于File
>
Settings
>
Editor
>
Live Templates
>
Django
>
block
。 (如果你想配置实时模板 https://www.jetbrains.com/help/pycharm/using-live-templates.html#live_templates_configure).
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)