Install gocode

1. D:\AWS_workspace\DAAS_Go>go get -u -ldflags -H=windowsgui github.com/nsf/gocode

2. Then gocode.exe will be installed in "D:\AWS_workspace\DAAS_Go\bin"

3. In Eclipse->Goclipse, set executable of  gocode as this "D:\AWS_workspace\DAAS_Go\bin\gocode.exe".

See details in https://github.com/nsf/gocode

=============

http://hao.jobbole.com/gocode/

gocode是go语言自动补全守护程序

提供各种高级特性,目前包括

上下文敏感的自动补全

这个程序被称为守护进程是因为它使用了客户端服务器的架构,自动补全的速度特别快,热缓存的自动补全时间仅仅为30ms,几乎感觉不到。

使用

1,  首先你已经安装了go语言环境和设置了$GOPATH,保证你的 $PATH包含了 $GOPATH/bin

2  你需要一个合适的gocode版本,  6g/8g/5g的go编译器,你需要

go get -u github.com/nsf/gocode (-u flag for “update”)

windows 用户需要

go get -u -ldflags -H=windowsgui github.com/nsf/gocode

3  下面要做的是和你使用的编辑器相关的了,

Vim

1 从$GOROOT/misc/vim目录中安装Go的vim脚本

2  安装gocode  vim脚本

vim/update.sh

update.sh脚本干以下事情

Java

1

2

3

4

5

#!/bin/sh

mkdir -p "$HOME/.vim/autoload"

mkdir -p "$HOME/.vim/ftplugin/go"

cp "${0%/*}/autoload/gocomplete.vim" "$HOME/.vim/autoload"

cp "${0%/*}/ftplugin/go/gocomplete.vim" "$HOME/.vim/ftplugin/go"

当然你也可以使用symlink.sh来避免每次gocode升级后都要运行update.sh

symlink.sh 干以下事情

Java

1

2

3

4

5

6

7

#!/bin/sh

cd "${0%/*}"

ROOTDIR=`pwd`

mkdir -p "$HOME/.vim/autoload"

mkdir -p "$HOME/.vim/ftplugin/go"

ln -s "$ROOTDIR/autoload/gocomplete.vim" "$HOME/.vim/autoload/"

ln -s "$ROOTDIR/ftplugin/go/gocomplete.vim" "$HOME/.vim/ftplugin/go/"

保证vim  开启了filetype插件,  .vimrc中加上filetype plugin on就行了

现在就可以自动补全了  使用  <C-x><C-o> 开启自动补全

使用 Vundle

在你的 .vimrc 中加上

Java

1

Plugin ‘nsf/gocode‘, {‘rtp‘: ‘vim/‘}

运行:PluginInstall

Emacs

1   安装 auto-complete-mode

2  从gocode  源文件中拷贝emacs/go-autocomplete.el到你的 emacs的 load-path 目录中

3  在你的.emacs 中加上

Java

1

2

(require ‘go-autocomplete)

(require ‘auto-complete-config)

github网址https://github.com/nsf/gocode

==========================================

http://blog.csdn.net/patch/article/details/10126281

golang环境安装配置

go的安装比较简单,下载exe直接执行就可以

windows环境变量里的配置说下

GOROOT  C:\Go

GOOS  windows

GOARCH  amd64

GOPATH  D:\go\test

PATH 增加C:\Go\bin

安装msysgit

下载页面

一路next,默认装到C:\msysgit\msysgit

安装gocode

运行msysgit安装目录下的git-cmd.bat,在打开的dos窗口运行

go get -u -ldflags -H=windowsgui github.com/nsf/gocode

会自动编译生成exe文件

gocode源码下载到D:\go\test\src

exe在D:\go\test\bin

将gocode.exe复制到C:\Go\bin

安装完成

时间: 2024-08-08 13:54:14

Install gocode的相关文章

Install golang on Ubuntu 14.04 LTS

1. Install golang on Ubuntu 14.04 LTS a)~$ sudo apt-get install golang                   success b)~$ sudo add-apt-repository ppa:gophers/go ~$ sudo apt-get update ~$ sudo apt-get install golang-stable         fail c) complie from source code        

Emacs for Go

In this post I'm going to explore customizing Emacs to make hacking on Go a little more fluid. This is a living document and will probably be updated as I discover new modes and tools. The Emacs modes I currently use are: go-mode, oracle, goflymake,

how to install runC on ubuntu14.04

https://github.com/opencontainers/runc/wiki/Ubuntu-14.04---Mint17-and-runc this link is pretty good. But please be careful about the "golang" version. if you use 'apt-get install golang', you will get go1.2 which is not work for the build. == wh

2015.11.04 学习 Ubuntu下安装gocode

2015.11.04 学习 Ubuntu下安装gocode 1.go get github.com/nsf/gocode,如果不成功 2.网页http://github.com/nsf/gocode,下载包,然后解压,解压后的文件名为gocode-master,修改为gocode. 3.复制gocode文件夹到go的安装目录~/go/github.com/nsf/gocode,(没有的话自行创建) 4.然后命令行执行go install github.com/nsf/gocode.确保安装目录的

gocode+auto-complete搭建emacs的go语言自动补全功能

上篇随笔记录了在emacs中使用go-mode和goflymake搭建了go语言的简单编程环境(推送门),今天来记录一下使用gocode+auto-complete配置emacs中go语言的自动补全功能.先看一下效果图??,我的emacs配置可以参考myemacs-conf. 关于gocode gocode是nsf写的各种编辑器提供go语言自动补全功能的工具.参考github中的README.md对gocode进行一下安装. $ go get -u github.com/nsf/gocode 安

Install Hyper-V on Windows 10

? Enable Hyper-V to create virtual machines on Windows 10.Hyper-V can be enabled in many ways including using the Windows 10 control panel, PowerShell (my favorite) or using the Deployment Imaging Servicing and Management tool (DISM). This documents

Ubuntu16.04 install OpenJDK8

1.按Ctrl + Alt + T打开终端.打开后,运行下面的命令来添加PPA:sudo add-apt-repository ppa:openjdk-r/ppa 2.之后,更新系统包缓存并安装OpenJDK 8: sudo apt-get update sudo apt-get install openjdk-8-jdk 3.如果您的系统上安装了多个Java版本.运行下面的命令设置默认的Java:sudo update-alternatives --config java 键入一个数字以选择J

Install Adobe Flash Player 11.2 on CentOS/RHEL 7/6/5, Fedora 20/19

Adobe Flash Player are very useful for watching videos in web browser online. Without flash player most of the videos will not play in your browser. This article will help you to install Adobe flash player plugin for your browsers in CentOS 6/5, Redh

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu

About LAMP LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the virtual private server is already running Ubuntu, the linux part is taken care of. Here i