Emacs + gocode makes writing the go language more powerful.

Source: Internet
Author: User
Tags gocode

First of all, I would like to thank dataangel (qq: 996421165) for its children's shoes. His personal comprehension ability is poor, but he still patiently teaches. Here, I just want to talk about the problems I encountered when I got into the go language. Install the configuration environment, compile the code environment and compile the environment configuration for integration. It is hoped that it will bring convenience to friends who are learning the go language.

I wrote it in windows. Other systems have not been configured. If you have no configuration, you will continue to write a blog ~~! I hope that I will not write well at the beginning.

 

 

 

 

Go language: 102319854

Some common links:

Http://golang.org // Official Website

Http://bbs.golang-china.org // Chinese Forum

Http://code.google.com/p/golang-china/ // translation documentation

Http://code.google.com/p/gomingw/ // windows Compilation

 

 

Liteide is recommended for project management and compilation.

 

Code emacs + gocode

 

Download gocode to the bin directory of your go language environment

You must configure the environment variables of the go language and add them to the system variables (I will not talk about them here for some tutorials on the Internet)

Start the command line and execute the following command

 

Gocode set propose-builtins true
Gocode set lib-path C:/go/pkg/windows_386

 

Gocode set

Check whether the setting is successful (shown below when the setting is successful ):

Propose-builtins = true <br/> lib-path = "C:/go/pkg/windows_386" <br/>

 

Download emacs

Set the environment variable HOME to the emacs path

Download the go configuration file

Http://download.csdn.net/source/3158030

Note: After the configuration is complete, a gocde configuration file will be generated in the. config folder. Generation order

 

 

Enter gocode-s in the cmd command
Start to use

 

Try using emacs to create a go file and write a helloworld file ~~!

I encountered two problems in my personal use.

 

1. Sometimes there is no prompt: it is estimated that the analysis file has not been fully analyzed, and so on.

2. If you do not use gocode-s to write go code, it will become stuck. It is estimated that the socket cannot be listened.

 

Others are quite OK. It would be even better if you can integrate and compile the project management. I am used to vc. In addition, the level is limited.

Compilation of liteide management projects is quite convenient. It would be nice to integrate gocode ~~~!

 

 

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.