vim-go-extra


Ⅰ. 插件描述

Extra plugin for golang

Ⅱ. 基本信息

创建日期:  2014-07-03
使用用户:  149
Github星:  87
插件作者:  vim-jp

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Extra Vim plugins for Go

This is a collection of extra vim plugins for Go. This is based on go's official repository located at misc/vim.
This plugins provides following feature:

  • :Godoc command to open documentation window.
  • :Fmt command to format current buffer.
  • :Import command to add import statement.

And if you has installed some go utilities, this will add runtime path to the vim plugins which is the utilities provides.
Below is the list of supported utilities.

Installation

To install using pathogen.vim:

cd ~/.vim/bundle
git clone https://github.com/vim-jp/vim-go-extra.git

To install using Vundle:

" add this line to your .vimrc file
Plugin 'vim-jp/vim-go-extra'

To checkout the source from repository:

cd ~/.vim/bundle
git clone https://github.com/vim-jp/vim-go-extra.git

Configuration

A popular configuration is to gofmt Go source files when they are saved.
To do that, add this line to the end of your $HOME/.vimrc.

autocmd FileType go autocmd BufWritePre <buffer> Fmt

License

Same as original plugins that go was provided. i.e. BSD

添加新评论