Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8153955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:11:07+00:00 2026-06-06T16:11:07+00:00

I tried :s%/{//g and :s%/\{//g . How do I find and replace (remove, actually)

  • 0

I tried :s%/{//g and :s%/\{//g. How do I find and replace (remove, actually) braces in vim?

Thanks.

EDIT: I meant to have the % before the s, so I may have just been mistyping. Thanks everyone for the swift replies.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T16:11:08+00:00Added an answer on June 6, 2026 at 4:11 pm

    An extension to @chaos

    The { character (ie: left brace, not to be confused with bracket [, or parentheses ( )
    … does not need to be escaped.

    You probably mean to remove all braces. The percent symbol should be before the ‘s’, not after. It means to perform the search on all ranges.

    So, just do:

    :%s/{//g
    :%s/}//g
    

    All done!

    You should consider reading up on VIM ranges. For example, to do replacements on the current line and up to 10 lines down, you could do:

    :.,.+10s/}//g
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to find an easy solution for the following. I have a main
How can I remove lines that only contain spaces when using Eclipse Find/Replace prompt.
I am trying do a find and replace in VI to remove a timestamp.
I have tried to use the following regex expression to remove html whitespace and
I tried to find and replace some tags with SpringSource Tool Suite(Eclipse). I want
I have tried and searched but didn't find... How can I change the following
How can I replace empty lines in Notepad++? I tried a find and replace
tried to find the answer by googling and in MSDN but with no luck.
I tried to find the answer to this question but could not, to be
I tried to find the difference on Google. BUT I 'm not able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.