Skip to content

Commit

Permalink
Add b option to rust snippets.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbishop committed Apr 18, 2014
1 parent 7af4b8f commit 28fc195
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions UltiSnips/rust.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ priority -50
###############
# Functions #
###############
snippet fn "A function, optionally with arguments and return type."
snippet fn "A function, optionally with arguments and return type." b
fn ${1:function_name}(${2})${3/..*/ -> /}${3} {
${VISUAL}${0}
}
endsnippet

snippet test "Test function"
snippet test "Test function" b
#[test]
fn ${1:test_function_name}() {
${VISUAL}${0}
}
endsnippet

snippet new "A new function"
snippet new "A new function" b
pub fn new(${2}) -> ${1:Name} {
${VISUAL}${0}return $1 { ${3} };
}
endsnippet

snippet main "The main function"
snippet main "The main function" b
pub fn main() {
${VISUAL}${0}
}
endsnippet



snippet let "A let statement"
snippet let "A let statement" b
let ${1:name}${3} = ${VISUAL}${2};
endsnippet

Expand Down

0 comments on commit 28fc195

Please sign in to comment.