Sublime Text Configuration Golang development environment

Source: Internet
Author: User
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;"},

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.