Vim has some very useful text motions such as ib, i), i}, etcetera to quickly select a portion of text. But, I often need an inner block in line-wise mode. For example (with line numbers):
1: $foo = array(
2: 'bar' => 'Bar',
3: 'quux' => 'Quux',
4: );
Now, when my cursor is on line 2 or 3 somewhere and I hit vib or vi), Vim selects line 2, 3 and the indenting spaces on line 4. I just want line 2 and 3. I have tried with Vib and Vi) but they do the same as with a lowercase v.
Is there any easy text motion or other quick way to select an inner block in line-wise mode?
I found a simpler way in the end: vim-indent-object allows me to select regions of text based on the indentation level. This is pretty much the same thing considering my source code is always nicely indented.
Now, if I am on line 2 or 3 in my example, I can simply press vii to select the inner indentation object, and it selects line 2 and 3. Groovy!