Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:49 Go to next message
John Hite is currently offline John HiteFriend
Messages: 3
Registered: September 2014
Junior Member
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 23:17 Go to previous messageGo to next message
Jeff Hopkins is currently offline Jeff HopkinsFriend
Messages: 5
Registered: July 2014
Junior Member
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 11:35 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
There is also a nice plugin to visualize corresponding brackets better.
http://marketplace.eclipse.org/content/bracketeer-cc-cdt


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Github import / AVR Toolchain link
Next Topic:Weird errors all of a sudden...
Goto Forum:
  


Current Time: Fri Apr 19 12:29:06 GMT 2024

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

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

Back to the top