How to use sublime 3 jinja2 highlighter

Question:

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

Asked By: kanelloc

||

Answers:

You need to add .j2 to your file extension:

mysupertemplate.html.j2

Have a look at the syntax file (under fileTypes)

Answered By: math2001

.j2 is missing as it’s supposed to be your file extension

mysupertemplate.html.j2

you need to add .html and .j2 to the file name

Answered By: Thidjahnee Horlah