vimrc/sources_non_forked/vim-snippets/UltiSnips/rust.snippets

36 lines
720 B
Text
Raw Normal View History

2014-04-18 12:58:02 +00:00
#######################################################################
# Rust Snippets #
#######################################################################
2014-07-02 11:18:18 +00:00
priority -50
2018-12-17 11:28:27 +00:00
snippet fn "pub fn name(?) -> ? {}"
fn ${1:function_name}($2)${3/..*/ -> /}$3 {
${VISUAL}$0
}
endsnippet
2015-12-08 13:20:04 +00:00
2018-12-17 11:28:27 +00:00
snippet pfn "pub fn name(?) -> ? {}"
pub fn ${1:function_name}($2)${3/..*/ -> /}$3 {
${VISUAL}$0
}
2015-03-14 20:02:10 +00:00
endsnippet
2018-12-17 11:28:27 +00:00
snippet pri "print!(..)" b
print!("$1"${2/..*/, /}$2);
2015-03-14 20:02:10 +00:00
endsnippet
2018-12-17 11:28:27 +00:00
snippet pln "println!(..)" b
println!("$1"${2/..*/, /}$2);
2015-03-14 20:02:10 +00:00
endsnippet
2018-12-17 11:28:27 +00:00
snippet fmt "format!(..)"
format!("$1"${2/..*/, /}$2);
2014-07-02 11:18:18 +00:00
endsnippet
2014-04-18 12:58:02 +00:00
2019-01-08 10:11:54 +00:00
snippet .it ".iter()" i
2018-12-17 11:28:27 +00:00
.iter()$0
2015-03-14 20:02:10 +00:00
endsnippet
2014-04-18 12:58:02 +00:00
# vim:ft=snippets: