diff --git a/vim/neosnippets/rust.snip b/vim/neosnippets/rust.snip index 02949bd..e359b06 100644 --- a/vim/neosnippets/rust.snip +++ b/vim/neosnippets/rust.snip @@ -2,3 +2,12 @@ snippet debug abbr deb options head println!("{:?}", ${1}); + +snippet impldisplay +abbr disp +options head + impl fmt::Display for ${1} { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "${2}", ${3}) + } + }