From 3c71ddf625f99b245cd324f0a1b2dc06b331829d Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 27 Sep 2018 19:03:44 -0700 Subject: [PATCH] [vim] Add rust snippets --- vim/snippets/rust.snippets | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 vim/snippets/rust.snippets diff --git a/vim/snippets/rust.snippets b/vim/snippets/rust.snippets new file mode 100644 index 0000000..b9c6bd3 --- /dev/null +++ b/vim/snippets/rust.snippets @@ -0,0 +1,32 @@ +# rust.snippets +# vim: set ts=8 sw=8 sts=8 noet list: +# Eryn Wells + +snippet head + /* ${1:`expand('%:t')`} + * `g:snips_author` + */ + + ${2:// TODO: The rest of this file. ;)} + +snippet display + impl fmt::Display for ${1:Foo} { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + ${2:// TODO} + } + } + +snippet debug + impl fmt::Debug for ${1:Foo} { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + ${2:// TODO} + } + } + +snippets tests + #[cfg(test)] + mod tests { + #[test] + fn it_works() { + } + }