This is a creation in Article, where the information may have evolved or changed.
1, install sublime text 3, the current Gosublime no longer support sublime Text2
2. After installation, open sublime, install package control, open console control+ ', Input in console:
Import Urllib.request,os,hashlib; H=' 7183a2d3e96f11eeadd761d777e62404 '+' e330c659d4bb41d3bdf022e94cab3cd0 '; PF =' Package control.sublime-package '; IPP = Sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); by= Urllib.request.urlopen (' http://packagecontrol.io/'+ PF.Replace(' ','%20 ')).Read(); DH = hashlib.sha256 ( by). Hexdigest (); Print' Error validating download (got%s instead of%s), please try manual install '% (DH, h))ifDH! = hElse Open(Os.path.join (IPP, PF),' WB ').Write( by)
3, restart Sublime, open preferences, more than the package control and its setting, installation success
4, Ctrl+shift+p Open the Control Panel Select Install packages, install Gosublime
5. Set Gosublime,preferences->package-setting->user:
{ "env{ "GOPATH": "/Users/XXX/mygo", "GOROOT": "/usr/local/Cellar/go/1.6.2/libexec" }}
6. Set go build, Tools->build system->new Build:
{ "shell_cmd": "go build $filename"}