vim-gocode


Ⅰ. 插件描述

A Go bundle for Vundle or Pathogen

Ⅱ. 基本信息

创建日期:  2013-05-20
使用用户:  377
Github星:  232
插件作者:  Antoine Chauvin

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'blackrush/vim-gocode-mine'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'blackrush/vim-gocode-mine'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'blackrush/vim-gocode-mine'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/blackrush/vim-gocode

Ⅳ. 文档说明

vim-gocode

All credit goes to nsf/code and Go authors.
All Vim plugins from Go 1.2 are also included.

You should not install this plugin with either fsouza/go.vim or jnwhiteh/vim-golang! It could take unknown effect on your setup.

Commands

  • :RelPkg takes no or one argument, a relative package path, and prints it as a full package path. If no argument is given, default to current package.

Example :RelPkg ../pkg/child in the $GOPATH/src/github.com/Blackrush/gofus/main.go file will print github.com/Blackrush/pkg/child

  • :GoInstall takes no or one argument, a relative package path, installs it or prints compilation errors otherwise. If no argument is given, default to current package.

Example :GoInstall ../pkg/child with current working directory $GOPATH/src/github.com/Blackrush/gofus
will try to install the github.com/Blackrush/pkg/child package

  • :GoTest takes no or one argument, a relative package path, tests it and prints its output. If no argument is given, default to current package.

Example :GoTest ../pkg/child with current working directory $GOPATH/src/github.com/Blackrush/gofus
will try to test the github.com/Blackrush/pkg/child package

  • :GoImport, :GoImportAs and :GoDrop are equivalent of original :Import, :ImportAs and :Drop
  1. takes all a relative package path to the current working directory
  • :make — you can use QuickFix to iterate through build errors if any; if file is in subdirectory of $GOPATH/src/, the whole package is build, else — only current file

See #1 to see future commands implementation.

Installation

Make sure you have installed gocode before installing this plugin :

go get github.com/nsf/gocode

Vundle

Add this line to your ~/.vimrc configuration file :

Bundle 'Blackrush/vim-gocode'

And then run vim :

vim +BundleInstall

Pathogen

cd ~/.vim/bundle
git clone https://github.com/Blackrush/vim-gocode.git

添加新评论