Ⅰ. 插件描述
A Vim plugin to quickly spin off asyncronous Python tests in a Tmux SplitⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'captbaritone/vim-vigilant'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'captbaritone/vim-vigilant'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'captbaritone/vim-vigilant'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/captbaritone/vim-vigilant
Ⅳ. 文档说明
# Vigilant
A Vim plugin to quickly spin off asynchronous Python tests in a Tmux split.
Installation
We depend upon Vimux, so you will need to
install it as well. Use your plugin manager
(Vundle,
Plug,
Pathogen) to install these two GitHub
repositories:
benmills/vimux
captbaritone/vim-vigilant
In your .vimrc set the script you use to run your tests:
" Default
let g:vigilant_cmd = 'nosetests'
Mappings
Vigilant simply exposes commands, but to use them you probably want to create
some mappings in your .vimrc:
" Run all your tests
" e.g. nosetests
nnoremap <leader>va :VigilantRunTests<cr>
" Run the currently open test file
" e.g. nosetests /path/to/my/file.py
nnoremap <leader>vf :VigilantRunCurrentTests<cr>
" Run a single test class based on cursor postion
" e.g. nosetests /path/to/my/file.py:MySuite
nnoremap <leader>vc :VigilantRunTestClass<cr>
" Run a single test method based on cursor postion
" e.g. nosetests /path/to/my/file.py:MySuite.my_test_method
nnoremap <leader>vm :VigilantRunSingleTest<cr>
" Rerun your last Vigilant test command
nnoremap <leader>vv :VigilantRerun<cr>