Created
December 7, 2019 14:53
-
-
Save YuukiToriyama/2c7d128c3bb7a6c2c1721621e0b94e58 to your computer and use it in GitHub Desktop.
my snipMate setting for Rust(.rs)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# snippets for Rust(.rs) | |
# install snipMate to your Vim and copy this file to $HOME/.vim/snippets | |
# version 2019/12/07 | |
# © Copyright 2019 YUUKIToriyama. All Rights Reserved. | |
snippet use | |
use ${1:library}; | |
snippet fn | |
fn ${1:func_name}() { | |
${2} | |
} | |
snippet match | |
match ${1:variable} { | |
${2} | |
} | |
snippet if | |
if ${1:condition} { | |
${2} | |
} | |
snippet else | |
else { | |
${1} | |
} | |
snippet elif | |
else if ${1:condition} { | |
${2} | |
} | |
snippet loop | |
loop { | |
${1://code} | |
} | |
snippet while | |
while ${1:condition} { | |
${2} | |
} | |
snippet for | |
for ${1:element} in ${2:} { | |
${3} | |
} | |
snippet print | |
println!(${1}); | |
snippet exp | |
expect("${1}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment