Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Find matching brace or parenthesis(Some editors have tools/shortcuts like ctrl+] to find the matching enclosure)
Find matching brace or parenthesis [message #1430677] Wed, 24 September 2014 12:49 Go to next message
Eclipse UserFriend
Is there a hot key or short cut for finding a matching brace or parenthesis in the Eclipse editor? It is helpful when looking at a large piece of code to be able to click on a parenthesis and have the other shown. Also useful for finding mismatches.

thanks,
jh
Re: Find matching brace or parenthesis [message #1432292 is a reply to message #1430677] Fri, 26 September 2014 19:17 Go to previous messageGo to next message
Eclipse UserFriend
Shift-Ctrl-P should do the job. (Found under the menu Navigate->Go To->Go To Matching Bracket. Don't like that shortcut? Setup your own from Window->Preferences->General->Keys. There's a lot there so it's easy to get lost or overwhelmed.

The matching enclosure (brace, paren, bracket,...) is mildly highlighted when your cursor is sitting just outside the scope next to the enclosure symbol, but I've found that hard to see and it doesn't help when it is off screen.

You could set yourself up with code "folding" (Window->Preferences->C/C++->Editor->Folding) such that the file opens with many different sections collapsed with a +/- symbol to open/close the section so you only start looking at particular scopes. It's not exactly what you're asking for, but it is a method to keep the vertical screen footprint a little smaller and give you a slightly better chance that the matching enclosure is on the same page. (I've found that view a little annoying when I've forgotten a section is folded, but if it suits your purpose...)
Re: Find matching brace or parenthesis [message #1433892 is a reply to message #1432292] Mon, 29 September 2014 07:35 Go to previous message
Eclipse UserFriend
There is also a nice plugin to visualize corresponding brackets better.
http://marketplace.eclipse.org/content/bracketeer-cc-cdt
Previous Topic:Github import / AVR Toolchain link
Next Topic:Weird errors all of a sudden...
Goto Forum:
  


Current Time: Sat Aug 30 23:14:55 EDT 2025

Powered by FUDForum. Page generated in 0.05171 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top