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

Updated vim plugins

This commit is contained in:
amix
2016-07-16 20:30:35 +02:00
parent c4e6a11dad
commit 64a81818ee
21 changed files with 429 additions and 122 deletions

View File

@ -151,14 +151,7 @@ if err != nil {
${0}
endsnippet
# error snippet
snippet errt "Error test fatal " !b
if err != nil {
t.Fatal(err)
}
${0}
endsnippet
# error multiple return
snippet errn, "Error return with two return values" !b
if err != nil {
return ${1:nil}, err
@ -166,6 +159,23 @@ if err != nil {
${0}
endsnippet
# error panic
snippet errp "Error panic" !b
if err != nil {
panic(${1})
}
${0}
endsnippet
# error test
snippet errt "Error test fatal " !b
if err != nil {
t.Fatal(err)
}
${0}
endsnippet
# error handle
snippet errh "Error handle and return" !b
if err != nil {
${1}
@ -174,8 +184,9 @@ if err != nil {
${0}
endsnippet
# json field tag
snippet json "\`json:key\`"
\`json:"${1:keyName}"\`
\`json:"${1:`!v go#util#snippetcase(matchstr(getline("."), '\w\+'))`}"\`
endsnippet
# fallthrough