Friday, November 4, 2011

Select Outer Block

Say I have some code like this:

sub {
foo {

bar {
baz {
humbug!
}
}
}
}

and I have the cursor somewhere on the humbug line. If I want to select the whole lot, to the very outer block, ie. everything from 'sub {' to its closing brace, I can do 'v4a{'. However, that requires me knowing how many blocks I'm inside. Doing something like 'v9a{' doesn't select anything. Naturally, 'vap' doesn't work because of the blank line. Is there a 'to outer-est block' sequence?

--

.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: