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 855  Comments, bugs, improvements  Vim wiki

created by
Duncan Beaton
 
script type
utility
 
description
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.

Usage

" Switch between JavaScript source and it's test file
:A

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

Extend

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

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github