How to delete enclosing braces in Vim?

Viewed 1224

I have the following text:

Monkeys eat {bananas}.

My cursor is in the middle of the word banana:

Monkeys eat {bana|nas}.

Here the | symbol denotes the cursor's position.

How can I delete the braces from there?

I can change bananas to apples with a simple ci}apples, so perhaps I could use a similar trick just to get rid of the { and } characters?

Also, can I do this even in this case, which is actually what I really need to do?

networks {
    local
    is|p
}

(The simplified example above was just to introduce the concept.)

4 Answers
Related