1
0
mirror of https://github.com/amix/vimrc synced 2025-02-28 14:12:51 +08:00
amix-vimrc-mirror/sources_non_forked/vim-snippets/UltiSnips/rust.snippets

35 lines
667 B
Plaintext
Raw Normal View History

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