Go+sublime Text 2 Environment construction

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

1, install the Go language.

. msi Download address:http://download.csdn.net/detail/u014075041/9555543

Follow the prompts to install successfully!

Execute Go env on the command line with the prompt to install successfully.

In general: After successful installation with the installer, the following variables are set in the environment variables:

PATH:%goroot%\bin

installation path for Goroot:go

path to the Gopath:go project

2. Install node. js

download address for. msi:http://download.csdn.net/detail/u014075041/9555548

Follow the prompts to install successfully!

Executing node-v on the command line indicates that the installation was successful.

In general: variables are set in environment variables:

Path: paths to NodeJs

Npm:node Package Manager Pack Manager.

If there is no npm to install: Download npm unzip to Nodejs folder use NPM on the command line if it appears Error creating the npm folder under the path of the hint

3. Install Sublime Text 2

download address for the. exe:http://download.csdn.net/detail/u014075041/9555574

4. Install the Go plugin in sublime text 2

I. Open sublime Text 2/ctrl+~/ on the command line

    import urllib2,os,hashlib; h =  ' 7183a2d3e96f11eeadd761d777e62404 '  +  ' E330c659d4bb41d3bdf022e94cab3cd0 '; 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 ())  )  by = urllib2.urlopen (  ' http://sublime.wbond.net/'  +  Pf.replace ('   ',  '%20 '). read ();  dh = hashlib.sha256 (by). Hexdigest ();  open (  Os.path.join ( IPP, PF),  ' WB '  ). Write (by)  if dh == h else  None; print (' error validating download  (got %s instead of %s),  Please try manual install '  %  (dh, h)  if dh != h else   ' PLEASE RESTART SUBLIME&NBSp Text to finish installation ')     

/ See the package Control menu item under perferences

II. Restart Sublime text 2/ctrl+shift+p/install package/gosublime

/ctrl+shift+p/install Package/gogdb

Iii. Configuring gosublime perfenences/package settings/gosublime/settings-default

"env": {

"Path": Installation path for "D:\\go\\bin"//go

}

Iv. Configuring gogdb perferences/package settings/gogdb/settting-defalut

"Workingdir": Path to "D:/gopath"// Open Project

"CommandLine": "GdB--interpreter=mi./main.exe" Name of the execution file

IIV. Placing the gdb.exe gocode.exe under the%goroot%\bin

Download Address:

5. Install the nodejs plugin in sublime text 2

I. download nodejs plugin

Download Address: http://download.csdn.net/detail/u014075041/9555623

Ii. perferences/browser Package Rename the nodejs plugin to Nodejs Unzip and put it in the open folder

III. Open the Nodejs plugin / open nodejs.sublime-build file /

"Encoding": "gb2312"

"Windows": {

"cmd": ["D:\\tools\\nodejs\\node.exe", "$file"]

}

Iv. Perferences/package Settings/nodejs/setting-default

"Node_command": "D:\\tools\\nodejs\\node.exe"

"Nmp_command": "D:\\tools\\nodejs\\npm.cmd"

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.