Skip to content

Instantly share code, notes, and snippets.

@me7
Created May 13, 2015 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save me7/45fa82aa24c2224c4ecd to your computer and use it in GitHub Desktop.
Save me7/45fa82aa24c2224c4ecd to your computer and use it in GitHub Desktop.
Gosublime Settings
{
"fmt_cmd": ["goimports"],
"autocomplete_snippets": true,
"autocomplete_builtins": true,
"autocomplete_closures": true,
"autocomplete_suggest_imports": true,
"use_named_imports": true,
"default_snippets": [
{
"match": {"global": true, "pkgname": "."},
"snippets": [
{"text": "ife", "title": "if err!=nil {...}", "value": "if err != nil {\n\treturn err\n}\n\n$0"},
{"text": "ife1", "title": "if err!=nil {nil.err}", "value": "if err != nil {\n\treturn ${1: nil,}err\n}\n$0"},
{"text": "ifok", "title": "if err=n(); err {...}", "value": "if err = $1; err {\n\treturn $2, err\n}\n$0"},
{"text": "err", "title": ", err=$1; err {...}", "value": ", err = $1; err {\n\treturn $2, err\n}\n\n$0"},
{
"text": "func http handler",
"title": "func(rw, req)",
"value": "func ${1:name}(rw http.ResponseWriter, req *http.Request) {\n\t$0\n}"
}
]
},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment