Browse files

Switch between rspec1 and 2 with :Rspec1 and :Rspec2

  • Loading branch information...
1 parent a989f1c commit 52f7cbc249e9aaae2aeb1c52eb95a3edf2d6d9df @skwp skwp committed Sep 26, 2012
Showing with 15 additions and 0 deletions.
  1. +1 −0
  2. +14 −0 plugin/vim-ruby-conque.vim
@@ -4,6 +4,7 @@ Ruby Conque & Fast-spec Aware RSpec Finder
* Colorized Ruby, Rake, RSpec, and Cucumber output in vim using ConqueTerm
* Spec Finder - use `Ctrl-s` to automatically find the related spec and open in a split, fast_spec aware!
* Sensible keybindings (feel free to change), all prefixed with 'rc':
+ * Switch between running rspec1 and rspec2 with `:Rspec1` and `:Rspec2` (you need both installed)
nmap <silent> <Leader>rcrr :call RunRubyCurrentFileConque()<CR>
@@ -106,6 +106,16 @@ function! RubyConqueControls(single_conque)
:map <silent><buffer> f /Finished in<CR>:noh<CR>zt
+function! UseRspec1()
+ let g:ruby_conque_rspec_runner='spec'
+ echo "Now using spec runner (RSpec 1)"
+function! UseRspec2()
+ let g:ruby_conque_rspec_runner='rspec'
+ echo "Now using rspec runner (RSpec 2)"
call conque_term#register_function('after_startup', 'RubyConqueControls')
command! RunRubyCurrentFileConque call RunRubyCurrentFileConque()
@@ -117,6 +127,8 @@ command! RunRakeConque call RunRakeConque()
command! RunLastConqueCommand call RunLastConqueCommand()
command! RunRspecRelated call RunRspecRelated()
command! CloseSingleConque call CloseSingleConque()
+command! Rspec1 call UseRspec1()
+command! Rspec2 call UseRspec2()
nmap <silent> <Leader>rcrr :RunRubyCurrentFileConque<CR>
nmap <silent> <Leader>rcss :RunRspecCurrentFileConque<CR>
@@ -127,3 +139,5 @@ nmap <silent> <Leader>rcRR :RunRakeConque<CR>
nmap <silent> <Leader>rcrl :RunLastConqueCommand<CR>
nmap <silent> <Leader>rcrel :RunRspecRelated<CR>
nmap <silent> <Leader>rccc :CloseSingleConque<CR>
+nmap <silent> <Leader>rcr1 :Rspec1<CR>
+nmap <silent> <Leader>rcr2 :Rspec2<CR>

0 comments on commit 52f7cbc

Please sign in to comment.