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

Can't run commands from MacVim #117

Open
wilgoszpl opened this issue Mar 31, 2016 · 2 comments
Open

Can't run commands from MacVim #117

wilgoszpl opened this issue Mar 31, 2016 · 2 comments

Comments

@wilgoszpl
Copy link

When I try to run rspec commandsj from macVim, there is an error shown:

Error detected while processing function RunCurrentSpecFile[4]..<SNR>92_RunSpecs:
E34: No previous command

From the terminal vim everything works fine though.

Here is my config. I use iTerm2 as terminal:

let g:rspec_runner = "os_x_iterm2"
let g:rspec_command = "!spring rspec --color {spec}"
map <Leader>t :call RunCurrentSpecFile()<CR>
map <Leader>s :call RunNearestSpec()<CR>
map <Leader>l :call RunLastSpec()<CR>
map <Leader>a :call RunAllSpecs()<CR>
@bashcoder
Copy link

I had a similar problem. First, removing the ! character at the front of the command fixes that particular error, but then spring itself will not recognize rspec anyway. So instead of specifying a g:rspec_command in my .vimrc, I did the following:

Install the spring-commands-rspec gem into your development group in your Gemfile, run bundle install, and run bundle exec spring binstub rspec in your local environment to set up an rspec binstub for spring. You may also have to run spring stop after this.

Now, every time you run rspec it will be run in the context of the Spring framework, including while working in vim with vim-rspec.

Hope this helps.

@wilgoszpl
Copy link
Author

Thanks! Removing ! was the point!

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