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

Updated plugins. Added vim-golang as a mode

This commit is contained in:
amix
2014-03-11 21:10:50 +01:00
parent 2b82c75631
commit 8f0740e307
125 changed files with 4121 additions and 2440 deletions

View File

@ -1,5 +1,4 @@
# From the TextMate bundle
# with some modification
priority -50
snippet fun "Function" b
${1:name} = `!p snip.rv = "(" if t[2] else ""`${2:args}`!p snip.rv = ") " if t[2] else ""`->
@ -10,52 +9,52 @@ 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"
snippet if "If" b
if ${1:condition}
${0:# body...}
endsnippet
snippet ife "If .. Else"
snippet ife "If .. Else" b
if ${1:condition}
${2:# body...}
else
${3:# body...}
endsnippet
snippet eif "Else if" b
snippet elif "Else if" b
else if ${1:condition}
${0:# body...}
endsnippet
snippet ifte "Ternary if"
snippet ifte "Ternary if" b
if ${1:condition} then ${2:value} else ${3:other}
endsnippet
snippet unl "Unless"
snippet unl "Unless" b
${1:action} unless ${2:condition}
endsnippet
snippet fora "Array Comprehension"
snippet fora "Array Comprehension" b
for ${1:name} in ${2:array}
${0:# body...}
endsnippet
snippet foro "Object Comprehension"
snippet foro "Object Comprehension" b
for ${1:key}, ${2:value} of ${3:Object}
${0:# body...}
endsnippet
snippet forr "Range Comprehension (inclusive)"
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)"
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"
snippet swi "Switch" b
switch ${1:object}
when ${2:value}
${3:# body...}
@ -63,7 +62,7 @@ switch ${1:object}
$0
endsnippet
snippet swit "Switch when .. then"
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}
@ -77,7 +76,7 @@ class ${1:ClassName}`!p snip.rv = " extends " if t[2] else ""`${2:Ancestor}
$0
endsnippet
snippet try "Try .. Catch"
snippet try "Try .. Catch" b
try
$1
catch ${2:error}
@ -95,4 +94,3 @@ endsnippet
snippet log "Log" b
console.log ${1:"${2:msg}"}
endsnippet