Skip to content

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

License

Notifications You must be signed in to change notification settings

cris/erlang-alternate.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published