/vim-toggle-js-test

Toggle between test and source code for JavaScript

Primary LanguageVim scriptMIT LicenseMIT

Vim Toggle JS Test

Toggle between test and source code for JavaScript.

Test files and source code should live in the same directory.

Test files should be named: {source}.test.js

For example:

app/foo.js
app/foo.test.js

Install

Commands

:TestToggle

Toggle between test and source JavaScript files.

Mappings

vim-toggle-js-test has a <Plug> key which can be used to create a custom mapping

For example:

au FileType javascipt nmap <leader>t <Plug>(test-toggle)