简体   繁体   English

sublime 3 jinja2荧光笔的使用方法

[英]How to use sublime 3 jinja2 highlighter

I have a problem with jinja2 highlighter in sublime 3.All the files associated with.html extensions don't recognize jinja templates blocks..I searched the web but the only solution I found is to make a.jinja.html custom extension..anyone got any idea how to solve this?..This is the plugin I installed https://packagecontrol.io/packages/Jinja2我在 sublime 3 中遇到了 jinja2 荧光笔的问题。所有与 .html 扩展相关的文件都无法识别 jinja 模板块。我在网上搜索过,但我找到的唯一解决方案是制作一个 .jinja.html 自定义扩展。有人知道如何解决这个问题吗?..这是我安装的插件https://packagecontrol.io/packages/Jinja2

You need to add .j2 to your file extension: 您需要将.j2添加到文件扩展名:

mysupertemplate.html.j2

Have a look at the syntax file (under fileTypes ) 看一下语法文件 (在fileTypes下)

Matt 马特

.j2 is missing as it's supposed to be your file extension .j2 丢失,因为它应该是您的文件扩展名

mysupertemplate.html.j2

you need to add .html and .j2 to the file name您需要在文件名中添加.html.j2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM