kudago / jinja2-tmbundle

Jinja2 Syntax Support for TextMate and Sublime Text
18 stars 9 forks source link

Add missing snippets #4

Open everyonesdesign opened 7 years ago

everyonesdesign commented 7 years ago

Missing snippets are:

set

Note that set can be used as

{% set a = 'Hello, bear!' %}

as well as

{% set a %}Hello, bear!{% endset %}

with

with also has 2 forms. First version syntax is

{% with a='Hello, bear!' %}{% endwith %}

and the second one (scope restricting) is

{% with %}
    {% set a='Hello, bear!' %}
{% endwith %}
dgirgenti commented 7 years ago

👍

while you're at it get include in there too

rludgero commented 4 years ago

Are you still planning on implementing these snippets?

Missing snippets:

{% set foo = 42 %}

{% set navigation %}
    <li><a href="/">Index</a>
    <li><a href="/downloads">Downloads</a>
{% endset %}
{% with foo = 42 %}
    {{ foo }}
{% endwith %}

{% with %}
    {% set foo = 42 %}
    {{ foo }}
{% endwith %}
{% include 'header.html' %}

Thank you in advance