Sublime Text2 configured as Golang IDE

Source: Internet
Author: User
Tags sublime text golang ide gocode
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:

    • Gosublime
    • Gocode

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.

Related Article

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.