This is a creation in
Article, where the information may have evolved or changed.
1.vundle
2. Plugin ' Fatih/vim-go '
3 Vim +goinstallbinaries
4
CD $GOPATH/src/github.com/nsf/gocode/vim
./update.bash
Gocode Set Propose-builtins True
Gocode set Lib-path "/home/anjun/go/path/pkg/linux_amd64"
. VIMRC
Set nocompatible "be improved, required
FileType off "required
Set the runtime path to include Vundle and initialize
Set Rtp+=~/.vim/bundle/vundle.vim
Call Vundle#begin ()
Plugin ' Vundlevim/vundle.vim '
Plugin ' Fatih/vim-go '
Plugin ' Scrooloose/nerdtree '
Plugin ' Dgryski/vim-godef '
Plugin ' Blackrush/vim-gocode '
Plugin ' Majutsushi/tagbar '
Plugin ' Shougo/neocomplete.vim '
Call Vundle#end () "Required
FileType plugin indent on "required
"To ignore plugin indent changes, instead use:
"FileType plugin on
"
"Brief Help
":P luginlist-lists configured Plugins
":P Lugininstall-installs plugins; Append '! ' to update or just:P luginupdate
":P Luginsearch foo-searches for foo; Append '! ' to refresh local cache
":P luginclean-confirms removal of unused plugins; Append '! ' to auto-approve removal
"
"See:h Vundle for more details or wiki for FAQ
"Put your non-plugin stuff after this line
Set number
Let G:go_disable_autoinstall = 0
Let G:neocomplete#enable_at_startup = 1
ColorScheme Molokai
Let G:tagbar_type_go = {
\ ' Ctagstype ': ' Go ',
\ ' Kinds ': [
\ ' P:package ',
\ ' I:imports:1 ',
\ ' C:constants ',
\ ' V:variables ',
\ ' T:types ',
\ ' N:interfaces ',
\ ' W:fields ',
\ ' e:embedded ',
\ ' M:methods ',
\ ' R:constructor ',
\ ' F:functions '
\ ],
\ ' SRO ': '. ',
\ ' Kind2scope ': {
\ ' t ': ' CType ',
\ ' n ': ' Ntype '
\ },
\ ' Scope2kind ': {
\ ' CType ': ' t ',
\ ' ntype ': ' N '
\ },
\ ' Ctagsbin ': ' Gotags ',
\ ' Ctagsargs ': '-sort-silent '
\ }
Nmap <F8>:tagbartoggle<cr>
Autocmd Bufwritepre *.go:fmt