vim-golang-alternate


Ⅰ. 插件描述

Overrides vim's :A command to toggle between go implementation code and test code.

Ⅱ. 基本信息

创建日期:  2013-01-16
使用用户:  12
Github星:  21
插件作者:  Ben Mills

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-golang-alternate

Overrides vim's :A command to toggle between go implementation code and test code.

usage

  • :A will open the current file's tests or the current test's implementation based on what is currently opened.
  • :AS will act the same as :A but will move the current file to a new buffer in a split.
  • :AV will act the same as :AS but with a vertical split.

installation

With vim-bundle: vim-bundle install benmills/vim-golang-alternate

Otherwise download the latest tarball, extract it and move plugin/vim-golang-alternate.vim inside ~/.vim/plugin and ftplugin/go.vim inside ~/.vim/ftplugin. If you're using pathogen, then move the entire folder extracted from the tarball into ~/.vim/bundle.

添加新评论