Add twig-mode snippets
This commit is contained in:
parent
d41afa89fd
commit
d311cffd16
5 changed files with 35 additions and 0 deletions
7
emacs/.emacs.d/snippets/twig-mode/blk
Normal file
7
emacs/.emacs.d/snippets/twig-mode/blk
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet; require-final-newline: nil -*-
|
||||||
|
# name: block
|
||||||
|
# key: blk
|
||||||
|
# --
|
||||||
|
{% block $1 %}
|
||||||
|
$0
|
||||||
|
{% endblock %}
|
5
emacs/.emacs.d/snippets/twig-mode/ext
Normal file
5
emacs/.emacs.d/snippets/twig-mode/ext
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- mode: snippet; require-final-newline: nil -*-
|
||||||
|
# name: extends
|
||||||
|
# key: ext
|
||||||
|
# --
|
||||||
|
{% extends "$0" %}
|
7
emacs/.emacs.d/snippets/twig-mode/if
Normal file
7
emacs/.emacs.d/snippets/twig-mode/if
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet; require-final-newline: nil -*-
|
||||||
|
# name: if
|
||||||
|
# key: if
|
||||||
|
# --
|
||||||
|
{% if $1 %}
|
||||||
|
$0
|
||||||
|
{% endif %}
|
9
emacs/.emacs.d/snippets/twig-mode/ife
Normal file
9
emacs/.emacs.d/snippets/twig-mode/ife
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# -*- mode: snippet; require-final-newline: nil -*-
|
||||||
|
# name: if...else
|
||||||
|
# key: ife
|
||||||
|
# --
|
||||||
|
{% if $1 %}
|
||||||
|
$0
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
{% endif %}
|
7
emacs/.emacs.d/snippets/twig-mode/mac
Normal file
7
emacs/.emacs.d/snippets/twig-mode/mac
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet; require-final-newline: nil -*-
|
||||||
|
# name: macro
|
||||||
|
# key: mac
|
||||||
|
# --
|
||||||
|
{% macro ${1:name}(${2:args}) %}
|
||||||
|
$0
|
||||||
|
{% endmacro %}
|
Loading…
Reference in a new issue