Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Add the ability to run
\rc
to run tests for a context.Why
The move to vim-test would remove the ability to run a test for a
context, this adds that back in. If run on a line that is a context
block, it will run that context as per the previous behavior.
Technical Details
The regexes used here are based on the ones used in
vim-ruby
to findnested 'class/module/do' + end blocks and navigate them properly. This
will find each parent block until it finds a test context or cannot find
a new parent.
Additionally, the
wall
function was moved inside the function becauseon blank lines the
<CR>
would move down a line and that would changethe behavior.