Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer

There is matchit plugin for this kind of job.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .