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
Amir Salihefendic 1d42b63013 Updated plugins
2019-01-08 11:11:54 +01:00

35 lines
720 B
Text

#######################################################################
# Rust Snippets #
#######################################################################
priority -50
snippet fn "pub fn name(?) -> ? {}"
fn ${1:function_name}($2)${3/..*/ -> /}$3 {
${VISUAL}$0
}
endsnippet
snippet pfn "pub fn name(?) -> ? {}"
pub fn ${1:function_name}($2)${3/..*/ -> /}$3 {
${VISUAL}$0
}
endsnippet
snippet pri "print!(..)" b
print!("$1"${2/..*/, /}$2);
endsnippet
snippet pln "println!(..)" b
println!("$1"${2/..*/, /}$2);
endsnippet
snippet fmt "format!(..)"
format!("$1"${2/..*/, /}$2);
endsnippet
snippet .it ".iter()" i
.iter()$0
endsnippet
# vim:ft=snippets: