Ⅰ. 插件描述
unite-go-imports provides unite-sources(`go/import`, `go/drop`)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'toqoz/unite-go-imports'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'toqoz/unite-go-imports'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'toqoz/unite-go-imports'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/toqoz/unite-go-imports
Ⅳ. 文档说明
# unite-go-imports
Requirements
- vim-jp/go-vim or fatih/vim-go or other provider of drop command.
`go get github.com/ToQoz/goimps` Add `set rtp+=$GOPATH/src/github.com/ToQoz/goimps/misc/vim` to your vimrc
Installation
with NeoBundle
Add NeoBundle 'ToQoz/unite-go-imports'
with Vundle
Add Bundle 'ToQoz/unite-go-imports'
Configuration
If you want to use custom godrop/goimport command that is not :Drop/:Import nor :GoDrop/:GoImport.
g:godrop_command = "CustomeGoDrop"
g:goimport_command = "CustomeGoImport"if you don't define g:godrop_command/goimport_command, there are defined by this script by following rules
if exists(":Import")
g:goimport_command = "Import"
else
g:goimport_command = "GoImport"
endif
if exists(":Drop")
g:godrop_command = "Drop"
else
g:godrop_command = "GoDrop"
endifUsage
:Unite go/import
:Unite go/drop