From d311cffd164960e25553730327c497eb8211357c Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 21 Nov 2015 23:34:32 +0100 Subject: [PATCH] Add twig-mode snippets --- emacs/.emacs.d/snippets/twig-mode/blk | 7 +++++++ emacs/.emacs.d/snippets/twig-mode/ext | 5 +++++ emacs/.emacs.d/snippets/twig-mode/if | 7 +++++++ emacs/.emacs.d/snippets/twig-mode/ife | 9 +++++++++ emacs/.emacs.d/snippets/twig-mode/mac | 7 +++++++ 5 files changed, 35 insertions(+) create mode 100644 emacs/.emacs.d/snippets/twig-mode/blk create mode 100644 emacs/.emacs.d/snippets/twig-mode/ext create mode 100644 emacs/.emacs.d/snippets/twig-mode/if create mode 100644 emacs/.emacs.d/snippets/twig-mode/ife create mode 100644 emacs/.emacs.d/snippets/twig-mode/mac diff --git a/emacs/.emacs.d/snippets/twig-mode/blk b/emacs/.emacs.d/snippets/twig-mode/blk new file mode 100644 index 0000000..bb100a3 --- /dev/null +++ b/emacs/.emacs.d/snippets/twig-mode/blk @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: block +# key: blk +# -- +{% block $1 %} + $0 +{% endblock %} \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/twig-mode/ext b/emacs/.emacs.d/snippets/twig-mode/ext new file mode 100644 index 0000000..9785aed --- /dev/null +++ b/emacs/.emacs.d/snippets/twig-mode/ext @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: extends +# key: ext +# -- +{% extends "$0" %} \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/twig-mode/if b/emacs/.emacs.d/snippets/twig-mode/if new file mode 100644 index 0000000..a9385d9 --- /dev/null +++ b/emacs/.emacs.d/snippets/twig-mode/if @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: if +# key: if +# -- +{% if $1 %} + $0 +{% endif %} \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/twig-mode/ife b/emacs/.emacs.d/snippets/twig-mode/ife new file mode 100644 index 0000000..a4d18f3 --- /dev/null +++ b/emacs/.emacs.d/snippets/twig-mode/ife @@ -0,0 +1,9 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: if...else +# key: ife +# -- +{% if $1 %} + $0 +{% else %} + +{% endif %} \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/twig-mode/mac b/emacs/.emacs.d/snippets/twig-mode/mac new file mode 100644 index 0000000..d4e480a --- /dev/null +++ b/emacs/.emacs.d/snippets/twig-mode/mac @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: macro +# key: mac +# -- +{% macro ${1:name}(${2:args}) %} + $0 +{% endmacro %} \ No newline at end of file