"Go Language" "2" Sublime configuration Go Development environment

Source: Internet
Author: User
Tags sublime text

First, download sublime Text3

Readers can download HTTP://WWW.SUBLIMETEXT.COM/3 on official website

"Remarks":

Since I am using an operating system that is WIN8 64 bit, select the Windows * + bit link to download


Second, registered sublime TEXT3

1, installed after the open sublime text will find that the software is not registered, in fact, not registered relationship is not very small, just in the back when using the box will affect the ease of use

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/B4/wKioL1TcmeHAY-buAADNwkagSeU391.jpg "title=" Not registered. png "alt=" wkiol1tcmehay-buaadnwkagseu391.jpg "/>

2. Open Sublime Text and select "Help > Enter License"

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/B8/wKiom1TcrMKQTp2aAAEgYd2llpg120.jpg "title=" To register. png "alt=" wkiom1tcrmkqtp2aaaegyd2llpg120.jpg "/>

3, enter the registration code ( Note the Begin and end row also copied past ), click Use License

-----BEGIN LICENSE-----

K-20

Single User License

ea7e-940129

3A099EC1 c0b5c7c5 33EBF0CF be82fe3b

eac2164a 4f8ec954 4e87f1e5 7e4e85d6

C5605de6 dab003b4 d60ca4d0 77cb1533

3c47f579 fb3e8476 Eb3aa9a7 68C43CD9

8c60b563 80fe367d 8cad14b3 54fb7a9f

4123FFC4 d63312ba 141af702 f6bba254

B094B9C0 faa4b04c 06CC9AFC FD412671

82e3aee0 0f0faaa7 8fa773c9 383a9e18

------END LICENSE------

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/B8/wKiom1TcrafAAWy-AAGrSQbx5-I033.jpg "title=" Enter the registration code. PNG "alt=" wkiom1tcrafaawy-aagrsqbx5-i033.jpg "/>

"Remark": the registration code is valid for the 3065 version and I have not tried other versions


Third, install the package control plug-in for sublime text

There are a lot of articles on the Internet are installed through the input command, but in some networks this command will fail to perform, so here to manually install

1, from https://sublime.wbond.net/Package%20Control.sublime-package Download plugin (note: The plugin is also available in my upload center)

2. Open Sublime text and select "Preferences > Browse Packages"

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/B8/wKiom1TcsSPjdzdBAAFmVmLrlWY731.jpg "title=" Install the package control plug-in. png "alt=" wkiom1tcsspjdzdbaafmvmlrlwy731.jpg "/>

3, on the basis of the open path upward level, find and enter the "Installed Packages" directory

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/B4/wKioL1TcsrTiiR2pAAH3-R58omI381.jpg "title=" Locate the installed Packages directory. png "alt=" wkiol1tcsrtiir2paah3-r58omi381.jpg "/>4, download the 1th step" package Control.sublime-package "Copy to installed packages below

5. Restart Sublime Text, if you find the Package Control submenu item under the Preferences menu to indicate that the installation was successful

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/59/B8/wKiom1Tcspyg51NAAAG3x5QSLaI684.jpg "title=" Install the package control successfully. png "alt=" wkiom1tcspyg51naaag3x5qslai684.jpg "/>


Iv. installation of Gosublime plug-in

It is necessary to install the package control in the third step to allow sublime text to automatically install the Gosublime plugin or other plug-in

1. Open Sublime Text, then press CTRL + Shift + P shortcut to open a search window

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/59/B4/wKioL1TctQah-SMrAAI0v7W0mrc352.jpg "title=" Open the search box. png "alt=" wkiol1tctqah-smraai0v7w0mrc352.jpg "/>

2. After entering PCI in the input box, select the first item "Package Control:install package"

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/B8/wKiom1TctJDSQ3u8AAKTNMrlzTk544.jpg "title=" Search for install package.png "alt=" Wkiom1tctjdsq3u8aaktnmrlztk544.jpg "/>

3, such as sublime text automatic search, we enter "Gosublime"

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/59/B4/wKioL1TctjSDM2zvAAFpCluU7CI368.jpg "title=" Search Gosublime.png "alt=" Wkiol1tctjsdm2zvaafpcluu7ci368.jpg "/>

4, enter the auto-install Gosublime plug-in, but wait a moment, you will be prompted to set Gopath system variables

Gopath=%goroot%;%gobin%;%goroot%\src

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/59/B4/wKioL1TcuWXCECMaAAHWwCv1S0I148.jpg "title=" Set the GOPATH environment variable. png "alt=" wkiol1tcuwxcecmaaahwwcv1s0i148.jpg "/>

"Note": Gopath can be a directory for go to find the package directory, when using the import package name, if not found in the Goroot, will turn to Gopath to find


V. Test the success of Gosublime plug-in installation

1. Open Sublime Text to enter the following content

Package Main

Import "FMT"

Func Main () {

Fmt. Println ("Hello My GO")

}

2, select "File > Save with Encoding > UTF-8", as to why here choose UTF-8 in the back to explain

3, Save as Hello.go, this time the file should be automatically formatted

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/B5/wKioL1Tcu0iT8yi_AAFVbccy4ww705.jpg "title=" Auto format. png "alt=" wkiol1tcu0it8yi_aafvbccy4ww705.jpg "/>

4. Press "Ctrl + B" to enter "Go run Hello.go" in the box that opens below

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/B5/wKioL1TcvASTlUruAAF0UZ02vFo615.jpg "title=" Run go program. png "alt=" wkiol1tcvastluruaaf0uz02vfo615.jpg "/>

5, enter, the program will run and output "Hello my GO"

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/B5/wKioL1TcvF-g5A4OAAGMqGlG4IE558.jpg "title=" Run the result. png "alt=" wkiol1tcvf-g5a4oaagmqglg4ie558.jpg "/>


Vi. concluding remarks

1, install the Gosublime plug-in in the fourth step, if for some reason the automatic installation is unsuccessful, can be installed manually. The installation method is to open sublime text after selecting "Preferences > Browse Packages", then my upload center The Gosublime.zip compressed package in this article is downloaded and extracted to the current directory


2, if the Linux operating system installed sublime Text3 will appear unable to input Chinese, the corresponding solution can be searched on the internet

This article is from the "Green Guest" blog, please be sure to keep this source http://qingkechina.blog.51cto.com/5552198/1614162

"Go Language" "2" Sublime configuration Go Development environment

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.