Matching a closing brace in Visual Studio

后端 未结 8 1104
别跟我提以往
别跟我提以往 2021-01-17 11:01

Is there a setting in Visual Studio 2008 that I can turn on which would generate a matching closing brace for a opening brace?

EDIT: I would imagine that an IDE as p

8条回答
  •  庸人自扰
    2021-01-17 11:46

    I know the original question is about VS2008, but I'm putting this here as info for other people and to make it useful for recent versions

    VS 2010 and VS 2012

    The Productivity Power Tools (available for VS2010 and VS2012) extension now supports automatic brace completion.

    If you already have it installed for VS2010, you must update to at least version 10.0.10710.22. Click

    Tools -> Extension Manager -> Updates
    

    Once you have it installed, you can turn brace completion on or off by going to

    Tools -> Options -> Productivity Power Tools -> All Extensions -> Automatic Brace Completion
    

    The most recent version now provides the ability to turn of any features you don't like so you can configure it to your requirements

    VS 2013

    Even though there's a matching addin for Visual Studio 2013 as well, VS now has native support for automatic brace completion without using any addins. Just go to:

    Tools -> Options -> Text Editor -> C#
    

    Tick checkbox against Automatic brace completion

提交回复
热议问题