Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with Projectionist #113

Open
willian opened this issue Feb 23, 2016 · 1 comment
Open

How to use with Projectionist #113

willian opened this issue Feb 23, 2016 · 1 comment

Comments

@willian
Copy link

willian commented Feb 23, 2016

Hi,
I'm trying to use Projectionist with vim-rspec, I already have it working with Dispatch but not with Projectionist.

I have this configuration on my .vimrc:

let g:rspec_command = 'w | Dispatch rspec {spec}'

nnoremap <Leader>t :call RunCurrentSpecFile()<CR>
nnoremap <Leader>s :call RunNearestSpec()<CR>
nnoremap <Leader>l :call RunLastSpec()<CR>
map <leader>t :call RunCurrentSpecFile()<cr>
map <leader>s :call RunNearestSpec()<cr>
map <leader>l :call RunLastSpec()<cr>
map <leader>a :call RunAllSpecs()<cr>

And I have this .projections.json file:

{
  "spec/*_spec.rb": {
    "dispatch": "docker-compose run artisan bundle exec rspec {file}"
  }
}

For some reason, when why run <leader>s it runs w | Dispatch rspec {spec} and not docker-compose run artisan bundle exec rspec {file}.

I'm wondering it I should ignore vim-rspec or use another command to execute the Projectionist configuration.

Does anybody have this same situation?

@dgmstuart
Copy link
Contributor

I don't have a great understanding of how all this fits together, but perhaps it's something like projectionist isn't loaded in the expected way in the context that vim-rspec is running the command.

Here are a few ideas:

Does the | somehow confuse the issue? Does this work correctly if g:rspec_command = 'Dispatch rspec {spec}'?

Does it work in Terminal but not Gui (e.g. macvim) or vice versa?

Perhaps vim-rspec doesn't run in a buffer in the way that projectionist expects? tpope/vim-projectionist#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants