From 982f3472380187eabd56cc72bf2371c90b63e39e Mon Sep 17 00:00:00 2001 From: Ches Martin Date: Sat, 28 Feb 2015 21:15:58 -0500 Subject: [PATCH] rust: Fix nesting for impl snippet in SM/US --- UltiSnips/rust.snippets | 6 ++++++ snippets/rust.snippets | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/UltiSnips/rust.snippets b/UltiSnips/rust.snippets index 3bc0f79..a27d6fa 100644 --- a/UltiSnips/rust.snippets +++ b/UltiSnips/rust.snippets @@ -91,4 +91,10 @@ snippet fd "Struct field definition" w ${1:name}: ${2:Type}, endsnippet +snippet impl "Struct/Trait implementation" b +impl ${1:Type/Trait}${2: for ${3:Type}} { + ${0} +} +endsnippet + # vim:ft=snippets: diff --git a/snippets/rust.snippets b/snippets/rust.snippets index 96ec52e..8882c08 100644 --- a/snippets/rust.snippets +++ b/snippets/rust.snippets @@ -128,7 +128,7 @@ snippet st "Struct definition" ${0} } snippet impl "Struct/Trait implementation" - impl ${1:Type/Trait}${2: ${3:for Type}} { + impl ${1:Type/Trait}${2: for ${3:Type}} { ${0} } snippet stn "Struct with new constructor"