Just hit <Leader>rf
(rspec focus) to fold all example groups in the entire file except the full hierarchy to your spec that your cursor is inside. The current example is automatically centered on your screen, when possible.
This lets you easily see all the context
/describe
blocks that apply just to the current spec. See:
To re-expand all examples just hit zR
- Make all relevant
before
/let
/subject
blocks stay open - All separately folded example groups above and below the current one could be collapsed into a single fold
- Only set up mapping for files ending in
*_spec.rb
- Make it work for Jasmine