Switch between source and test files with :A
-command in Erlang projects.
:A
- switches from source to corresponding test file(or vise versa):AS
- splits and switches:AV
- vertical splits and switches:AT
- new tab and switches
Currently, only EUnit
and wooga/etest
directory conventions are supported:
- sources are located in
src/
- test files are located in
test/
- test file should be suffixed with
_tests.erl
(EUnit) or with_test.erl
(etest)
Example: src/hook.erl
is alternated to test/hook_tests.erl
or to
test/hook_test.erl
.
- Pathogen
git clone https://github.com/cris/erlang-alternate.vim ~/.vim/bundle/erlang-alternate.vim
- Vundle
Bundle 'cris/erlang-alternate.vim'
- NeoBundle
NeoBundle 'cris/erlang-alternate.vim'
- Create ability to switch-with-create, e.g.:
:A!
- requires configuration setting for type of tests or some smart-detection based on another tests
- Switch to header file as in
a.vim
(not sure whether it's valuable)