Built under Windows Golang Development environment (Sublime Text3 + gosublime + sublimegdb)

Source: Internet
Author: User
Tags sublime text

Recently began to learn the relevant development of the Go Language tutorial, the previous work is done on Linux mostly, but the home computer is still windows system.

After searching for n multiple schemes and experimenting with n multiple Ides, we decided to use the Sublime+gosublime plugin as a running demo for home learning.

Here you need to thank the go community and a few pre-existing building methods and documents, this page to record their own construction process of the main O (∩_∩) o haha

1. Install the Go language

Website address: https://golang.org/Click to download the installation version of the required platform, recommended MSI, download completed, click on the installation, the default settings can be installed to complete the relevant environment variables will be automatically set to complete

Using the cmd command to verify go env

2. Install sublime TEXT3 + package Control

Website address: http://www.sublimetext.com/

After downloading, the fool installs can.

Sublime is a paid version, continuously saved multiple times or reached a certain number will be prompted to purchase, after ignoring the normal use

Of course, in order to extend the sublime plug-in, you need to install the Packdge control feature.

After opening the sublime, press the shortcut key CTRL + "'", a command window will pop up below, copy the following, enter, wait for the installation to complete

Import Urllib.request,os,hashlib; h ='df21e130d211cfc94d9b0905775a7c0f'+'1e3d39e33b79698005270310898eea76'; 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! = hElseOpen (Os.path.Join(IPP, PF),'WB').Write(by)

If the installation encountered an error, please refer to the Packdge control official guidance, retry or use the offline installation method Https://packagecontrol.io/installation#st3

View after installation is complete

Click on the package Control, enter Insta, select the Install package confirmation

Enter Gosublime in the pop-up dialog box to find the corresponding option, enter

Wait a moment for the installation to complete, observe the description and progress of the sublime at the bottom of the task, it is best to restart the sublime Text after the installation is complete

After that, you need to configure the Gosublime plug-in accordingly.

Preferences->package Setting->gosublime->settings-user

In the window that opens, enter

{    "env": {        "gopath"" F:/mygo " // Personal Code Engineering path        to go program " Goroot " " E:/go " // installation path for Go language     }}

Finally restart the sublime to make this plugin available

At this point the initial development environment is ready to use, in the Mygo directory to create a go type of file, found that the code hints Lenovo function appears

PS: Can modify the overall configuration, such as fonts, such as the following configuration recommendations, preferences->setting

{    "font_size": A,    "Highlight_line":true,    "Highlight_modified_tabs":true,    "ignored_packages":    [        "Vintage"    ],    "Soda_classic_tabs":true,    "soda_folder_icons":true,    "tab_size":4,    "translate_tabs_to_spaces":true,    "Update_check":false,    "Word_wrap":true}

Built under Windows Golang Development environment (Sublime Text3 + gosublime + sublimegdb)

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.