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

  • Home
  • SEARCH
  • 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 101253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:44:08+00:00 2026-05-11T00:44:08+00:00

Given this line of code in C: printf(%3.0f\t%6.1f\n, fahr, ( (5.0/9.0) * (fahr-32) )

  • 0

Given this line of code in C:

printf('%3.0f\t%6.1f\n', fahr, ((5.0/9.0) * (fahr-32)));

Is there a way to delete or yank from the first bold parenthesis to its matching parenthesis? I thought about df), but that only will get you to just after the 9.0.

Is there a similar way to get vim to grab everything between matching braces, regardless of newlines?

  • 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. 2026-05-11T00:44:09+00:00Added an answer on May 11, 2026 at 12:44 am

    Various Motions: %

    The % command jumps to the match of the item under the cursor. Position the cursor on the opening (or closing) paren and use y% for yanking or d% for deleting everything from the cursor to the matching paren.

    This works because % is a ‘motion command’, so it can be used anywhere vim expects such a command. From :help y:

    ['x]y{motion}       Yank {motion} text [into register x].  When no                     characters are to be yanked (e.g., 'y0' in column 1),                     this is an error when 'cpoptions' includes the 'E'                     flag. 

    By default, ‘item’ includes brackets, braces, parens, C-style comments and various precompiler statements (#ifdef, etc.).

    There is a plugin for ‘extended % matching’ that you can find on the Vim homepage.

    You can read the documentation on % and related motion commands by entering :help various-motions in command mode.

    object-select

    There is another set of motion commands that you can use in Visual mode to select various text objects.

    To solve your specific problem you would do the following:

    printf('%3.0f\t%6.1f\n', fahr, ((5.0/9.0) * (fahr-32)));                                    ^ 

    Let’s say your cursor is positioned at ^. Enter the following sequence to select the part you are looking for:

    v2a) 

    First v enters Visual mode, then you specify that you want to go 2 levels of parens up. Finally the a) selects ‘a block’. After that you can use d or x to delete, etc.

    If you don’t want to include the outer parens, you can use ‘inner block’ instead:

    v2i) 

    See :help object-select for the complete list of related commands.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer In Objective-C, it's possible to return an instance other than… May 11, 2026 at 11:33 am
  • added an answer Most probably: Either your installation is corrupt or, you have… May 11, 2026 at 11:33 am
  • added an answer Velo moved the flexmojos codebase to Sonatype, we're currently updating… May 11, 2026 at 11:33 am

Related Questions

Given this line of code in C: printf(%3.0f\t%6.1f\n, fahr, ( (5.0/9.0) * (fahr-32) )
Given this HTML: <ul id=topnav> <li id=topnav_galleries><a href=#>Galleries</a></li> <li id=topnav_information><a href=#>Information</a></li> </ul> And this
Given this XML, what XPath returns all elements whose prop attribute contains Foo (the
Given this class class Foo { // Want to find _bar with reflection [SomeAttribute]
Given this example: <img class=a /> <img /> <img class=a /> <img class=a id=active
Given this data set: ID Name City Birthyear 1 Egon Spengler New York 1957
Given this: Public Sub timReminder_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) If DateTime.Now()
Given this algorithm, I would like to know if there exists an iterative version.
Given this HTML: <div>foo</div><div>bar</div><div>baz</div> How do you make them display inline like this: foo
Given this XML ... <ListBucketResult xmlns=http://s3.amazonaws.com/doc/2006-03-01/> <Name>public.rpmware.com</Name> <Prefix></Prefix> <Marker></Marker> <MaxKeys>1000</MaxKeys> <IsTruncated>false</IsTruncated> <Contents> <Key>0.dir</Key> <LastModified>2008-06-25T16:09:49.000Z</LastModified>

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.