Giter VIP home page Giter VIP logo

vim-ruby-conque's Introduction

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>
nmap <silent> <Leader>rcss :call RunRspecCurrentFileConque()<CR>
nmap <silent> <Leader>rcll :call RunRspecCurrentLineConque()<CR>
nmap <silent> <Leader>rccc :call RunCucumberCurrentFileConque()<CR>
nmap <silent> <Leader>rccl :call RunCucumberCurrentLineConque()<CR>
nmap <silent> <Leader>rcRR :call RunRakeConque()<CR>
nmap <silent> <Leader>rcrl :call RunLastConqueCommand()<CR>

nnoremap <silent> <C-s> :call RelatedSpecVOpen()<CR>
nnoremap <silent> ,<C-s> :call RelatedSpecOpen()<CR>

Recommended keybinings

Chords are faster than typing out long strings:

" Cmd-Shift-R for RSpec
nmap <silent> <D-R> :call RunRspecCurrentFileConque()<CR>
" Cmd-Shift-L for RSpec Current Line
nmap <silent> <D-L> :call RunRspecCurrentLineConque()<CR>
" ,Cmd-R for Last conque command
nmap <silent> ,<D-R> :call RunLastConqueCommand()<CR>

Using the Spec Runner

Try some of the keybindings listed above.

Upon running a test your cursor will be in the Conque buffer, you can use these commands:

q   closes/quits the buffer
n   goes to the next Failure message.
p   goes to the previous Failure message.
f   goes to the Finished At section for an overview of the test.

Using the Spec Finder

While inside a ruby file, invoke the shortcut (supplied as Ctrl-s), and the corresponding spec will be open. The assumptions are:

  • Your specs live in spec/ or fast_spec/
  • Your pwd (current dir) is the project root
  • You use the same dir structure in your code and specs so that code living at lib/foo/bar.rb has a spec at spec/lib/foo/bar_spec.rb

For more information, please see doc/spec-finder.txt. There are included functions for opening the spec in the current window, and in a split, as well as just getting its full path.

Configuration

This plugin tries to detect whether you use 'rspec' (rspec2) or 'spec' (rspec1) and set the default executable correctly. To override in your ~/.vimrc:

let g:ruby_conque_rspec_runner='spec'

Contribute

vim-ruby-conque's People

Contributors

bryanchriswhite avatar macedo avatar parkerl avatar skwp avatar zolrath avatar

Watchers

 avatar  avatar

Forkers

bryanchriswhite

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.