Skip to content

Instantly share code, notes, and snippets.

@memememomo
Created June 7, 2014 11:20
Show Gist options
  • Save memememomo/0789955fc0fff73e66f8 to your computer and use it in GitHub Desktop.
Save memememomo/0789955fc0fff73e66f8 to your computer and use it in GitHub Desktop.
Goをインストールし、Vimで書く環境を整えるまでの手順 ref: http://qiita.com/uchiko/items/4c186292f007535116cc
filetype off
filetype plugin indent off
set runtimepath+=$GOROOT/misc/vim
filetype plugin indent on
syntax on
autocmd FileType go autocmd BufWritePre <buffer> Fmt
exe "set rtp+=".globpath($GOPATH, "src/github.com/nsf/gocode/vim")
set completeopt=menu,preview
$ wget https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz
$ tar xvzf go1.2.2.linux-amd64.tar.gz
$ mv go1.2.2.linux-amd64 ~/go
$ mkdir ~/go/packages
export GOROOT=~/go
export GOPATH=$GOROOT/packages
export PATH=$PATH:$GOROOT/bin
$ go get github.com/nsf/gocode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment