Skip to content

Instantly share code, notes, and snippets.

@cihangir
Created August 2, 2014 19:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cihangir/4e8944c0838decf17476 to your computer and use it in GitHub Desktop.
Save cihangir/4e8944c0838decf17476 to your computer and use it in GitHub Desktop.
GoSublime.sublime-settings
{
"env":{"GOPATH": "/Users/siesta/go"},
"snippets": [
{
"match": {"global": true},
"snippets": [
{"text": "prl", "title": "fmt.Println(...)", "value": "fmt.Println(\"$1-->\", $1)"},
{"text": "prlpr", "title": "Pretty fmt.Println(...)", "value": "fmt.Printf(\"$1 %# v\", pretty.Formatter($1))"},
{"text": "prf", "title": "fmt.Printf(...)", "value": "fmt.Printf(\"$1 %+v\", $1)\n\n$2"},
{"text": "err", "title": "err clause", "value": "if err != nil {\n\treturn err$2\n}\n$3"},
{"text": "nerr", "title": "nil, err clause", "value": "if err != nil {\n\treturn nil, err$2\n}\n$3"},
{"text": "rnil", "title": "return nil clause", "value": "\nreturn nil"},
{"text": "rerr", "title": "return err clause", "value": "\nreturn err"},
{"text": "ok", "title": "ok clause", "value": "if !ok {\n\t$1\n}\n\n$2"}
]
}
],
"fmt_cmd": ["goimports"],
// whether or not builtin types and functions should be shown in the auto-completion list
"autocomplete_builtins": true,
// Whether or not gslint is enabled
"gslint_enabled": false,
// whether or not to show an expanded(closure) version of func types in the auto-completion list
// e.g. `type Fun func(i int)`
// will result in two entries `Fun` and `Fun {}`
// expanding to `Fun` and `func(i) {...}` respectively
"autocomplete_closures": true,
// whether or not autocomplete should suggest possible imports when autocomplete fails to
// find a match.
// note: this feature only comes into effect when autocomplete was triggered after a dot, e.g. `fmt.|`
"autocomplete_suggest_imports": true,
// The maximum amount of memory(MiB) that MarGo is allowed to use
"margo_oom": 2000,
// whether or not to show function call tip in the status bar
// the same can be achieved ctrl+dot,ctrl+space using an output panel
"calltips": true,
// whether or not MarGo may automatically run `go install` for packages that are missing
// when you `import`, or `autocomplete` them
"autoinst": true,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment