I noticed something unexpected. Using
var to highlight a block, then using
ir should expand and contract the selection. However
ir does not contract the selection.
Using your example:
[1,2,3].each do |i|
i + 1
- Starting on the line with
each and hitting
vir the inside of the
baz method is selected as expected.
- Now typing
ar expands the selection to the whole
baz method (from
- However, typing
ir now does nothing.
ar at this point will expand the selection to the
ir does nothing at this point.
- Once again typing
ar will expand the selection to the whole module.
- Now typing
ir will shrink the selection to the inside of the module.
- At this point
ar will expand to the whole module.
ar will contract and expand the selection, but only at the top level. If we try to type
ir twice it only contracts once.
I suspect that because the blocks are nested once you are at 2. you have highlighted the
baz method (around the previously selected inside) when you invoke
ir it does nothing because it says you are already at the inside of the class
Bar and therefore nothing happens.
What is odd is that I used the same text as the video but the behavior is different. I tried this on a number of real world ruby files with the same effect.
How do I troubleshoot this?