A Vim plugin to quickly spin off asynchronous Python tests in a Tmux split.
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'
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>