Quantcast
Channel: Atom-Jinja2 - do i need to rename .html to .html.j2 for jinja code completion and highlighting? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Atom-Jinja2 - do i need to rename .html to .html.j2 for jinja code completion and highlighting?

$
0
0

i'm using atom and i'm new to flask/jinja and really like to have highlighting/code completion to help me learn new syntax, so i installed the atom jinja-2 package, which works great IF i rename my .html files to .html.j2 - in files with a plain .html extension i get no highlighting inside {{}} blocks and no completion for eg. "block".

in the atom-jinja2 readme it says:

"HTML (Jinja templates)" syntax Jinja templates for HTML files. Alsomatches .html.j2

which suggests that it should work for .html files... do i need to do something in atom editor to declare that i'm writing in jinja rather than plain html, or do i need to rename my files to html.j2?

thanks

btw i'm mostly writing python in pycharm community edition and only using atom at all because PC CE has no support for frameworks and i can't afford a pro license... i'm not at all married to atom so if there's a better free-to-use IDE that handles frameworks, especially flask, then please let me know... if there's a single environment that is great for python as well as frameworks like jinja then double let me know!!


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images