This is a creation in Article, where the information may have evolved or changed.
First, the preparatory work:
1. Download Go Language pack: https://code.google.com/p/go/downloads/list
2. Download Git:https://code.google.com/p/msysgit/downloads/list
3. Download Sublime 2:HTTP://WWW.SUBLIMETEXT.COM/2
Second, installation:
1, install Go (all the way next), he will automatically help you configure environment variables
2, install sublime (all the way Next)
3. Install git (all the way Next)
Three, configuration:
1, install the package Control, after opening Sublime Text 2, press the shortcut key Ctrl + ', open the Command window line, ' This button in the TAB key above, I just started not found, hehe. Enter the following and return to:
Import Urllib2,os; Pf= ' Package control.sublime-package '; Ipp=sublime.installed_packages_path (); Os.makedirs (IPP) if not os.path.exists (IPP) else None; Urllib2.install_opener (Urllib2.build_opener (urllib2. Proxyhandler ())); Open (Os.path.join (IPP,PF), ' WB '). Write (Urllib2.urlopen (' http://sublime.wbond.net/' +pf.replace (', '%20 '). Read () ); print ' Restart Sublime Text to finish installation '
After restarting Sublime Text 2, it is possible to find a menu item under the Preferences menus with the package Control.
2. Install gocode, open cmd, and enter the following:
Go get Github.com/nsf/gocode
Go Install Github.com/nsf/gocode
After the installation is complete, we can find an extra Gocode file in the Go/bin directory.
3. Install the Gosublime plugin:
After opening Sublime Text 2, locate the package control under the Preferences menu, click Open, a package control interface will appear, enter the Install package, wait a while, and another interface will appear. At this time, enter Gosublime, click the item that appears, you can install gosublime successfully.
4. Modify the Gosublime configuration: Under the Preferences menu, locate the package Settings, find the Gosublime, and then find Settings-default. Re-open the file, add the following configuration, and save:
"env": {"path": "C:/go/bin;"},