1
0
Fork 0
mirror of synced 2024-12-27 00:53:20 -05:00
ultimate-vim/sources_non_forked/vim-snippets/UltiSnips/rust.snippets

35 lines
667 B
Text
Raw Normal View History

2014-04-18 08:58:02 -04:00
#######################################################################
# Rust Snippets #
#######################################################################
2014-07-02 07:18:18 -04:00
priority -50
2015-12-08 08:20:04 -05:00
2015-03-14 16:02:10 -04:00
snippet arg "Function Arguments" i
${1:a}: ${2:T}${3:, arg}
endsnippet
snippet || "Closure, anonymous function (inline)" i
2017-02-11 08:01:38 -05:00
${1:move }|$2| { $3 }
2015-03-14 16:02:10 -04:00
endsnippet
snippet |} "Closure, anonymous function (block)" i
2017-02-11 08:01:38 -05:00
${1:move }|$2| {
2015-03-14 16:02:10 -04:00
$3
}
endsnippet
2014-07-02 07:18:18 -04:00
snippet macro "macro_rules!" b
2016-03-14 06:04:57 -04:00
macro_rules! ${1:name} {
2014-07-02 07:18:18 -04:00
(${2:matcher}) => (
2017-02-11 08:01:38 -05:00
$3
2014-07-02 07:18:18 -04:00
)
2016-03-14 06:04:57 -04:00
}
2014-07-02 07:18:18 -04:00
endsnippet
2014-04-18 08:58:02 -04:00
2015-03-14 16:02:10 -04:00
snippet fd "Struct field definition" w
${1:name}: ${2:Type},
endsnippet
2014-04-18 08:58:02 -04:00
# vim:ft=snippets: