Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.19 KB

README.mkd

File metadata and controls

39 lines (26 loc) · 1.19 KB

erlang-alternate.vim

Switch between source and test files with :A-command in Erlang projects.

Usage

  • :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

Limitations

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.

Installation

  • 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'

Ideas

  • 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)