If someone is editing the following javascript file:
let foo = true
if (foo) {
let bar = 42
// moooooore code...
}
You can use vi{
anywhere on the line with let bar
to select let bar = 42
and all other lines inside {...}
.
However, how can I select based on indentation?
Let's take Ruby as an example:
def some_method
if @foo
@bar = 42
# moooooore code...
end
end
What command would I use to select @bar = 42
and all other code ?