3

I want to select a current block recursively .

for example i have this ruby code

1 def function
2   if true
3     if also_true
4       do this
5     end
6   end
7 end

for example im in the 4th line now. and when i press something, the visual block select the line 3-5 and if i press it again, it will select 2-6, and if i press it again it will select 1-7

3

It's possible natively in C, C++ and other languages using brackets to delimit "blocks" (with va{) but not in Ruby.

You'll need a plugin for that.

0

There is matchit plugin for this kind of job.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.