Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is the text:

It is the text outside the bracket. {I am some text in the backet.} This is another text outside the bracket.

I wanna to remove the {} inside the text. So, I f{ and x it, and f} then x it again.... is there any easy method for me the delete the bracket? Thanks.

share|improve this question
Why not just find all the brackets and replace them with empty string? (Sorry, but it's not very clear what you're trying to achieve here.) – ADTC Feb 15 '12 at 8:26
up vote 4 down vote accepted

put your cursor to block


yank inner block


select entire block


overwrite selected block


Note: It works on multi-line block.

share|improve this answer
Very nice. Takes care of nesting, multiline, etc. If the poster does this a lot, just map it to a key. – Daniel Andersson Feb 16 '12 at 9:36

Well, depending on "easy", but


Use with modifiers in regular order to handle multiple replacements per line, etc.

On a single bracket pair, this is more work than your manual example, but if it concerns many replacements it saves time.

EDIT: the difference between this and searching for all brackets and removing them (:s/[{}]//) is that this only removes balanced brackets, but with some quirks (nesting, as I mentioned).

"What am I really trying to do?" is almost always worth explaining in a question to get better answers.

share|improve this answer

Here's yet another way, and like kev's answer, it works on multi-line blocks and respects nesting braces.

Move your cursor to the block:


Jump to other end:


Delete brace at the end:


Jump back to where you started (these are backticks):


Delete brace at the beginning:


Here it is altogether:


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.