sponsor Vim development Vim logo Vim Book Ad

js_alternate : A JavaScript plugin to easily navigate between alternate files

 script karma  Rating 2/2, Downloaded by 697  Comments, bugs, improvements  Vim wiki

created by
Duncan Beaton
script type
Project https://github.com/dunckr/js_alternate.vim

Easy navigation of a JavaScript directory structure. Inspired by the amazing vim-rails.

There is one command, `:A` (alternate) for easy jumping between a JavaScript source file and it’s corresponding test.


" Switch between JavaScript source and it's test file

" Mapping to <leader>t
nnoremap <leader>t :call js_alternate#run()<cr>


let g:js_alternate#src_types = ['lib', 'src', 'app', 'scripts', 'js', 'javascript', 'frontend']
let g:js_alternate#test_types = ['tests', 'test', 'spec', 'features']
let g:js_alternate#extension_types = ['js', 'jsx', 'coffee', 'ts', 'elm', 'purs']
install details
Download zip, extract and put it in ~/.vim/autoload/

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
js_alternate.vim-master.zip 0.1.0 2017-04-08 7.0 Duncan Beaton Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
Vim at Github