Ⅰ. 插件描述
Easier navigation between production and test files in vim.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'davebrace/vim-testnav'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'davebrace/vim-testnav'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'davebrace/vim-testnav'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/davebrace/vim-testnav
Ⅳ. 文档说明
# vim-testnav
vim-testnav is a simple vim plugin that helps you navigate between a production file and its corresponding test file and vice versa.
It makes the following assumptions in order to work currently:
- You launch vim from the root directory of your project (the VIM working directory is the root of the project).
- You follow a naming convention where your test files are formatted to match this regex:
/(-|_)?([Ss]pec|[Tt]est)/before the file's extension. - You have vim compiled with Ruby and have the Unix
findcommand available.
Installation
If you're using pathogen, the following command should install the plugin for you:
cd ~/.vim/bundle && git clone git@github.com:davebrace/vim-testnav.gitKeyboard shortcuts
vim-testnav binds navigating between a prod file and the test alternate to <Leader>. by default.