TUT (toggle_unit_tests) : A plug-in for toggling between source and unit test files
script karma |
Rating 15/9,
Downloaded by 1251 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Pete Johns |
|
script type |
utility |
|
description |
Usage:
Use this plug-in when you are doing Test-Driven Development [TDD] in any
language to quickly switch between unit-test and production code. To make this
really fast bind the Toggle function to a function key in your .vimrc:
" [F3] toggles between (header, ) source and test files.
nnoremap <F3> :<C-U>TUT<CR>
This plug-in assumes source and unit test files are in the same directory.
Commands:
:TUT
Toggles betwixt source and unit test file
Mappings:
<Leader>tut
Calls :TUT
Settings:
By default, unit-test filenames are deemed to begin with 't_'.
Tell toggle_unit_tests.vim your own prefix by setting the following global
variable, perhaps in your .vimrc:
let g:unit_test_prefix='test_'
Update:
You can now grab the latest version, submit an improvement or report a bug on
GitHub:
http://github.com/johnsyweb/vim-tut/
|
|
install details |
I recommend installing pathogen.vim (vimscript#2332), and then simply copy and paste:
cd ~/.vim/bundle
git clone git://github.com/johnsyweb/vim-tut.git
vim -cHelptags -cq
Once help tags have been generated, you can view the manual with:
:help toggle_unit_tests
Alternatively, just unzip the file into your 'runtimepath' and run :helptags. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.134.95.211
|