Created
November 29, 2012 21:13
-
-
Save malclocke/4171963 to your computer and use it in GitHub Desktop.
Vim config for Javascript spec alternates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autocmd User Rails/app/assets/javascripts/*/*.js | |
\ let b:rails_alternate = substitute( | |
\ substitute(rails#buffer().path(), 'app/assets/', 'spec/', ''), | |
\ '.js', '_spec.js', '') | |
autocmd User Rails/spec/javascripts/*/*_spec.js | |
\ let b:rails_alternate = substitute( | |
\ substitute(rails#buffer().path(), 'spec/', 'app/assets/', ''), | |
\ '_spec.js', '.js', '') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment