This is a creation in Article, where the information may have evolved or changed.
Yesterday saw colleagues again with Emacs, good strong appearance, let me this pseudo emacser envy unceasingly, come back after thinking about again tossing and tossing Emacs.
First download Golang's official Emacs mode:
Http://golang.org/misc/emacs/go-mode.el
Download Auto-complete
http://cx4a.org/software/auto-complete/#Downloads
Then extract the files to any directory: Auto-complete
CD Auto-complete
Make
Make Install
Select the directory you want to install
then Emacs to add in the config file
(Add-to-list ' Load-path "Installpath/auto-complete") (Require ' auto-complete) (Require ' auto-complete-config) (Add-to-list ' ac-dictionary-directories "installpath/auto-complete/ac-dict") (Ac-config-default)
Download Misc/emacs two files from Https://code.google.com/p/go:
Go-mode.el
Go-mode-load.el
and copy these two files into your Emacs config file.
Download Gocode:
Get-u GitHub. com / NSF / Gocode
Set propose - True
Set Lib - "/usr/lib/go/pkg/linux_amd64/:your_own_gopath/pkg/linux_amd64"//This is your own path
then modify ~/.profile to set path:
Then the Emacs is added to the config file:
(Require ' go-autocomplete) (Require ' auto-complete-config) (Require ' go-mode-load)
This allows the system to automatically set the environment variables as soon as it is started and runs the Gocode
It is best to reboot, and then start Emacs to open a go file, you can automatically prompt the