Does not work when vim-rails is installed
apcomplete opened this issue · 1 comments
apcomplete commented
I've installed this alongside of vim-rails and vim always seems to use vim-rails to find the alternate file instead of this plugin. Do you know of a way to fix that?
apcomplete commented
Looks like you can just use vim-rails to solve this problem: https://robots.thoughtbot.com/extending-rails-vim-with-custom-commands
For anyone who sees this later, put something like this in your vimrc (this is mapping app/javascript/*/File.js
to app/javascript/*/File.test.js
):
let g:rails_projections = {
\ "app/javascript/*.test.js": { "alternate": "app/javascript/{}.js" },
\ "app/javascript/*.js": { "alternate": "app/javascript/{}.test.js" }
\ }