Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 2.66 KB

README.md

File metadata and controls

50 lines (35 loc) · 2.66 KB

🍹 Jinja2 Snippet Extension For VS Code

This extension bundles up all your most used jinja snippets for use in your HTML templates. Also I put in a few useful ones for things like generating numbers, joining lists, and the like.

🍣 Installation

Direct instalation is availible in the VS Code marketplace, just do a search for "Jinja2" and we should pop right up.

You can direct download the pluggin from Marketplace Site

☕ Usage

Usage is really simple, all the snippets are prefixed with J. Open any HTML file and type J to see a full listing of all the availible snippets.

Prefix Output
jblock {% block name %} {% endblock name %}
jif {% if cond %} {% endif %}
jifelse {% if cond %} {% else %} {% endif %}
jextend {% extends 'file' %}
jfor {% for A in B %} {% endfor %}
jrandom {{ range(MIN, MAX) | random }}
jvar {{ variable }}
jfunc {% function %}
jround {% float | round %}
jjoin {% list | join(',') %}
jset {% set A = B %}
jurl {{ url_for('dir', filename='file') }}
jcall {% call func %} {% endcall %}
jfilter {% filter cmd %} {% endfilter %}
jinclude {% include 'file' %}
jfrom {% from 'dir' import func %}
jimg <img src="{{ url_for('static', filename='A') }}" alt="B">
jhref a href with url_for embed

📮 Contact & Support

Created by Wyatt Ferguson

For any questions or comments heres how you can reach me:

📬 Email me at [email protected]

🍧 Follow on BlueSky @wyattf

🍹 Follow on Twitter @wyattxdev

If you find this useful and want to tip me a little coffee money: