From 06b7219f942b36b13a7bd98f4b868054d024409c Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Tue, 10 Oct 2023 08:16:42 -0700 Subject: [PATCH] More snippets! --- snippets/ansible-mode/ifdef | 7 +++++++ snippets/conf-unix-mode/ifdef | 7 +++++++ snippets/eshell-mode/for-loop | 5 +++++ snippets/org-mode/http | 9 +++++++++ 4 files changed, 28 insertions(+) create mode 100644 snippets/ansible-mode/ifdef create mode 100644 snippets/conf-unix-mode/ifdef create mode 100644 snippets/eshell-mode/for-loop create mode 100644 snippets/org-mode/http diff --git a/snippets/ansible-mode/ifdef b/snippets/ansible-mode/ifdef new file mode 100644 index 0000000..c4f4c37 --- /dev/null +++ b/snippets/ansible-mode/ifdef @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ifdef +# key: ifdef +# -- +{% if $1 is defined %} + $2 = {{ $1 }} +{% endif %} diff --git a/snippets/conf-unix-mode/ifdef b/snippets/conf-unix-mode/ifdef new file mode 100644 index 0000000..c4f4c37 --- /dev/null +++ b/snippets/conf-unix-mode/ifdef @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ifdef +# key: ifdef +# -- +{% if $1 is defined %} + $2 = {{ $1 }} +{% endif %} diff --git a/snippets/eshell-mode/for-loop b/snippets/eshell-mode/for-loop new file mode 100644 index 0000000..e451751 --- /dev/null +++ b/snippets/eshell-mode/for-loop @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +#name : Eshell for loop +#key : for +# -- +for f in ${1:*} { ${2:echo} "$f"; $3} $0 diff --git a/snippets/org-mode/http b/snippets/org-mode/http new file mode 100644 index 0000000..6bc553e --- /dev/null +++ b/snippets/org-mode/http @@ -0,0 +1,9 @@ +# key: