1
0
Fork 0
mirror of synced 2024-11-14 05:08:56 -05:00
ultimate-vim/sources_non_forked/vim-snippets/UltiSnips/rust.snippets
2018-10-14 21:43:54 +08:00

34 lines
667 B
Text

#######################################################################
# Rust Snippets #
#######################################################################
priority -50
snippet arg "Function Arguments" i
${1:a}: ${2:T}${3:, arg}
endsnippet
snippet || "Closure, anonymous function (inline)" i
${1:move }|$2| { $3 }
endsnippet
snippet |} "Closure, anonymous function (block)" i
${1:move }|$2| {
$3
}
endsnippet
snippet macro "macro_rules!" b
macro_rules! ${1:name} {
(${2:matcher}) => (
$3
)
}
endsnippet
snippet fd "Struct field definition" w
${1:name}: ${2:Type},
endsnippet
# vim:ft=snippets: