Add twig-mode snippets

This commit is contained in:
Tom Willemse 2015-11-21 23:34:32 +01:00
parent d41afa89fd
commit d311cffd16
5 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: block
# key: blk
# --
{% block $1 %}
$0
{% endblock %}

View file

@ -0,0 +1,5 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: extends
# key: ext
# --
{% extends "$0" %}

View file

@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: if
# key: if
# --
{% if $1 %}
$0
{% endif %}

View file

@ -0,0 +1,9 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: if...else
# key: ife
# --
{% if $1 %}
$0
{% else %}
{% endif %}

View file

@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: macro
# key: mac
# --
{% macro ${1:name}(${2:args}) %}
$0
{% endmacro %}