Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
101 lines
2.1 KiB
Plaintext
101 lines
2.1 KiB
Plaintext
priority -50
|
|
|
|
snippet fun "Function" b
|
|
${1:name} = `!p snip.rv = "(" if t[2] else ""`${2:args}`!p snip.rv = ") " if t[2] else ""`->
|
|
${0:# body...}
|
|
endsnippet
|
|
|
|
snippet bfun "Function (bound)" i
|
|
`!p snip.rv = "(" if t[1] else ""`${1:args}`!p snip.rv = ") " if t[1] else ""`=>`!p snip.rv = " " if t[2] and not t[2].startswith("\n") else ""`${2:expr}
|
|
endsnippet
|
|
|
|
snippet if "If" b
|
|
if ${1:condition}
|
|
${0:# body...}
|
|
endsnippet
|
|
|
|
snippet ife "If .. Else" b
|
|
if ${1:condition}
|
|
${2:# body...}
|
|
else
|
|
${3:# body...}
|
|
endsnippet
|
|
|
|
snippet elif "Else if" b
|
|
else if ${1:condition}
|
|
${0:# body...}
|
|
endsnippet
|
|
|
|
snippet ifte "Ternary if" b
|
|
if ${1:condition} then ${2:value} else ${3:other}
|
|
endsnippet
|
|
|
|
snippet unl "Unless" b
|
|
${1:action} unless ${2:condition}
|
|
endsnippet
|
|
|
|
snippet fora "Array Comprehension" b
|
|
for ${1:name} in ${2:array}
|
|
${0:# body...}
|
|
endsnippet
|
|
|
|
snippet foro "Object Comprehension" b
|
|
for ${1:key}, ${2:value} of ${3:Object}
|
|
${0:# body...}
|
|
endsnippet
|
|
|
|
snippet forr "Range Comprehension (inclusive)" b
|
|
for ${1:name} in [${2:start}..${3:finish}]`!p snip.rv = " by " if t[4] else ""`${4:step}
|
|
${0:# body...}
|
|
endsnippet
|
|
|
|
snippet forrex "Range Comprehension (exclusive)" b
|
|
for ${1:name} in [${2:start}...${3:finish}]`!p snip.rv = " by " if t[4] else ""`${4:step}
|
|
${0:# body...}
|
|
endsnippet
|
|
|
|
snippet swi "Switch" b
|
|
switch ${1:object}
|
|
when ${2:value}
|
|
${3:# body...}
|
|
else
|
|
$0
|
|
endsnippet
|
|
|
|
snippet swit "Switch when .. then" b
|
|
switch ${1:object}
|
|
when ${2:condition}`!p snip.rv = " then " if t[3] else ""`${3:value}
|
|
else`!p snip.rv = " " if t[4] and not t[4].startswith("\n") else ""`${4:value}
|
|
endsnippet
|
|
|
|
snippet cla "Class" b
|
|
class ${1:ClassName}`!p snip.rv = " extends " if t[2] else ""`${2:Ancestor}
|
|
|
|
${3:constructor:`!p snip.rv = " (" if t[4] else ""`${4:args}`!p snip.rv = ")" if t[4] else ""` ->
|
|
${5:# body...}}
|
|
$0
|
|
endsnippet
|
|
|
|
snippet try "Try .. Catch" b
|
|
try
|
|
$1
|
|
catch ${2:error}
|
|
$3
|
|
endsnippet
|
|
|
|
snippet req "Require" b
|
|
${1/^'?(\w+)'?$/\L$1\E/} = require(${1:'${2:sys}'})
|
|
endsnippet
|
|
|
|
snippet # "Interpolated Code" i
|
|
#{$1}$0
|
|
endsnippet
|
|
|
|
snippet log "Log" b
|
|
console.log ${1:"${2:msg}"}
|
|
endsnippet
|
|
|
|
snippet kv "Key:value for object" b
|
|
${1:key}:${2:value}
|
|
endsnippet
|