1
0
Fork 0
mirror of synced 2024-11-16 05:55:35 -05:00
ultimate-vim/sources_non_forked/vim-snippets/UltiSnips/rust.snippets

48 lines
945 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
2020-04-25 21:56:16 -04:00
snippet fn "fn name(?) -> ? {}"
2018-12-17 06:28:27 -05:00
fn ${1:function_name}($2)${3/..*/ -> /}$3 {
${VISUAL}$0
}
endsnippet
2015-12-08 08:20:04 -05:00
2018-12-17 06:28:27 -05:00
snippet pfn "pub fn name(?) -> ? {}"
pub fn ${1:function_name}($2)${3/..*/ -> /}$3 {
${VISUAL}$0
}
2015-03-14 16:02:10 -04:00
endsnippet
2020-05-10 10:24:38 -04:00
snippet afn "async fn name(?) -> ? {}"
fn ${1:function_name}($2)${3/..*/ -> /}$3 {
${VISUAL}$0
}
endsnippet
snippet pafn "pub async fn name(?) -> ? {}"
pub fn ${1:function_name}($2)${3/..*/ -> /}$3 {
${VISUAL}$0
}
endsnippet
2018-12-17 06:28:27 -05:00
snippet pri "print!(..)" b
print!("$1"${2/..*/, /}$2);
2015-03-14 16:02:10 -04:00
endsnippet
2018-12-17 06:28:27 -05:00
snippet pln "println!(..)" b
println!("$1"${2/..*/, /}$2);
2015-03-14 16:02:10 -04:00
endsnippet
2018-12-17 06:28:27 -05:00
snippet fmt "format!(..)"
format!("$1"${2/..*/, /}$2);
2014-07-02 07:18:18 -04:00
endsnippet
2014-04-18 08:58:02 -04:00
2019-01-08 05:11:54 -05:00
snippet .it ".iter()" i
2018-12-17 06:28:27 -05:00
.iter()$0
2015-03-14 16:02:10 -04:00
endsnippet
2014-04-18 08:58:02 -04:00
# vim:ft=snippets: