Sunday, May 29, 2011

Re: delete inside parentheses VIM?

On 29/05/11 1:11 PM, Antonio Recio wrote:
> "dab" it is useful to remove parentheses and content when cursor is over, I think.
> But I want to delete all the parentheses and the inside the parentheses with an
> unique commmand.

In the whole file?

This could work if they're not nested and not split across lines:

:%s/(.{-})//

I.e. change an opening parenthesis followed by as little as possible to
get to the next closing parenthisis, into nothing.

If that's not good enough, but the right kind of direction, I'm sure
some wizards here can extend it.

Smiles,

Ben.

--
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: