1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00

Updated plugins

This commit is contained in:
Amir
2020-05-10 10:24:38 -04:00
parent 8c90331742
commit d895af51c9
38 changed files with 724 additions and 307 deletions

View File

@ -14,7 +14,7 @@ export default $4`!p snip.rv = snip.basename`
endsnippet
# React Hooks
snippet useS "useState Hook" b
const [${1}, set$1`!p snip.rv=t[1].title()`] = useState(${3:"${4}"})
const [${1}, set`!p snip.rv=t[1].title()`] = useState(${3:"${4}"})
endsnippet
snippet useE "useEffect Hook" b
useEffect(() => {

View File

@ -16,6 +16,18 @@ pub fn ${1:function_name}($2)${3/..*/ -> /}$3 {
}
endsnippet
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
snippet pri "print!(..)" b
print!("$1"${2/..*/, /}$2);
endsnippet