SundayMonday
SundayMonday

Reputation: 19737

How to enable parenthesis completion in Visual Studio 2012 for C#?

Title says it all. I've been searching through:

TOOLS -> Options... -> Text Editor -> C# -> Formatting

and can't find anything like "Complete parenthesis yes/no". Textmate has paren completion, Eclipse has paren completion, Mono on OS X has paren completion but does VS really require a plug-in to do that?

Edit: I'm interested in VS automatically inserting the close paren when an open paren is typed. Title and question updated.

Upvotes: 2

Views: 3303

Answers (3)

LaurieCheers
LaurieCheers

Reputation: 11

In case it helps, the Visual Assist X extension also autocompletes braces exactly as the question describes (and does a ton of other useful things too).

I ended up here looking for a way to turn it off, which is under VAssistX -> Visual Assist Options ... -> Corrections.

Upvotes: 1

stackunderflow
stackunderflow

Reputation: 10672

Check out the visual studio extension called Brace Completer. Based on your description, I think it will do exactly what you want.

Upvotes: 3

Ninjammer
Ninjammer

Reputation: 157

I assume you mean highlighting an opening or closing bracket, ( or ), will highlight the opposite matching one?

It's there, it only happens if you place the cursor to the left of the parenthesis of interest, not highlight or to the right, and the default highlight colour can be difficult to see.

Here's VS2010 information, I'm assuming they wouldn't have changed too much in this area in 2012, they just don't seem to have a page like this for that version. http://msdn.microsoft.com/en-us/library/be94e8aw.aspx

Upvotes: 1

Related Questions