This is a creation in Article, where the information may have evolved or changed.
Installing Golang
Download the installation package for Windows directly, and the environment will be configured for you.
Installing the Sublime Text2 plugin
The following plug-ins are required, which is more convenient:
Install the sublime package management plug-in first
- To install the package Control, after opening Sublime Text 2, press the shortcut key Ctrl + ', open the Command window line, enter the following, and return:
import urllib2,os; pf='Package Control.sublime-package'ifnotelseNone; 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'print'Please 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.
Install the Gosublime plugin again
- Ctrl+shilft+p will pop up a dialog box, enter the install Enter to pop up an installation package dialog box, and then enter Gosublime return will automatically install the plug-in, after the finished restart the editor.
- After installation, modify the plugin configuration: Preferences->package settings->gosublime->setting Default, after opening the file, modify the env parameter:
"env": { "path""D:\\go\\bin"}
It's almost ready to go here and give a Hello world:
package mainimport"fmt"func main() { fmt.Printf("hello, world\n")}
Gocode
This I do not pretend, after looking at the need to add, specific reference:
Sublime Text2 for Golang IDE
PS: The main reference of this article is also the above.