Ⅰ. 插件描述
Vim Go Development EnvironmentⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'themue/vim-gode'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'themue/vim-gode'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'themue/vim-gode'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/themue/vim-gode
Ⅳ. 文档说明
# vim-gode
The Vim Go Development Environment is a small and lightweighted extension to the
original Vim Go plugins. So it is nothing very special, but provides some helpful
functions and according key mappings when editing a Go file.
The commands are
GoBuild/<C-G>bbuilds the package of the current fileGoRun/<C-G>rbuilds and runs the current fileGoDoc/<C-G>Dshows the Go documentation of the identifier under the cursorGoFmt/<C-G>fformats the Go codeGoGrep/<C-G>gshows all occurences of the word under the cursor in the packageGoInstall/<C-G>iinstalls the package of the current fileGoLint/<C-G>lrunsgolinton the current fileGoBenchmarkFunc/<C-G>mtakes the benchmark function surrounding the cursor and runs itGoBenchmark/<C-G>Mruns all benchmarks of the packageGoTestFunc/<C-G>ttakes the test function surrounding the cursor and tests itGoTest/<C-G>Truns all tests of the packageGoBuildTest/<C-G>Bruns a build of the tests without executing themGoTestCoverage/<C-G>cruns a coverage test of the packageGoVet/<C-G>vexamines Go source code and reports suspicious constructs
The opened quicklist window tries to have the best size.
More commands will follow.
Installation
The plugin can easily be installed when using the cool vim-plug
and add
Plug 'themue/vim-gode'
to your .vimrc. Alternatively you can use pathogen.vim.
Simply call
cd ~/.vim/bundle
git clone git://github.com/themue/vim-gode
After a restart of Vim you can use vim-gode.
License
vim-gode is distributed under the terms of the BSD 3-Clause license.