From 3c72ede965f29a8935d74a3083008ceb38873d9d Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Thu, 15 Aug 2019 13:16:41 +0300 Subject: [PATCH 1/2] rust: make fns/pfns like the rest of the function templates (fix #323) --- snippets/rust-mode/fns | 6 ++++-- snippets/rust-mode/pfns | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/snippets/rust-mode/fns b/snippets/rust-mode/fns index 6d2c828..23fada7 100644 --- a/snippets/rust-mode/fns +++ b/snippets/rust-mode/fns @@ -1,5 +1,7 @@ # -*- mode: snippet -*- -# name: fn name(&self) -> Type; +# name: fn name(&self) -> Type { ... } # key: fns # -- -fn ${1:name}(${2:&self}) -> ${3:Type}; \ No newline at end of file +fn ${1:name}(${2:&self}) -> ${3:Type} { + $0 +} \ No newline at end of file diff --git a/snippets/rust-mode/pfns b/snippets/rust-mode/pfns index 05a198e..4ad120f 100644 --- a/snippets/rust-mode/pfns +++ b/snippets/rust-mode/pfns @@ -1,5 +1,7 @@ # -*- mode: snippet -*- -# name: pub fn name(&self) -> Type; +# name: pub fn name(&self) -> Type { ... } # key: pfns # -- -pub fn ${1:name}(${2:&self}) -> ${3:Type}; \ No newline at end of file +pub fn ${1:name}(${2:&self}) -> ${3:Type} { + $0 +} \ No newline at end of file From bedc4a9589bfd8021b9fa2bc6ec29e8b86969c78 Mon Sep 17 00:00:00 2001 From: Spenser Truex Date: Sat, 14 Sep 2019 13:07:16 -0700 Subject: [PATCH 2/2] Renamed "switch" (which is not in lisp) to "cond" which is. --- snippets/lisp-mode/{switch => cond} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename snippets/lisp-mode/{switch => cond} (57%) diff --git a/snippets/lisp-mode/switch b/snippets/lisp-mode/cond similarity index 57% rename from snippets/lisp-mode/switch rename to snippets/lisp-mode/cond index 6d002dd..e0d954a 100644 --- a/snippets/lisp-mode/switch +++ b/snippets/lisp-mode/cond @@ -1,9 +1,9 @@ # -*- mode: snippet -*- -# name: switch -# key: switch +# name: cond +# key: cond # -- (cond (${1:case1} (${2:do-this})) - (${3:case2} (${4:do-this})) + (${3:case2} (${4:do-this})) (t ${5:default})) $0