automagically adding "" {} () [] etc...

I was at an MSDN event yesterday and the presenter enabled a setting in VS2005 that would automatically add a pair of quotes "" whenever the context was expecting it.

I have looked in my options of VS2005 standard and I can't find an options which does this.

I have found options which purports to automagically add braces {} when a new line is typed I.E.

class MyClass

{ <these added when new line (enter key) typed.

}

However my system doesn't do this.

Is there a master setting somewhere that enables these enhancements

Thanks

Edwin




Answer this question

automagically adding "" {} () [] etc...

  • kuponutcom

    OmegaMan I never knew that, works on for and if etc as well. That is really useful. Wish I knew about that ages ago now. :)


  • sorcer1

    Edwin -

    Other than you, we've heard significant feedback that users want this feature. It's something that we're definitely trying to do and hope to see in a release as soon as possible. :)

    Thanks!

    Karen



  • Jangu

    Hi, Edwin.

    You're right. Some Visual Studio 2005 editors automatically insert matching quotation marks and such. For example, you can toggle the XML editor's automatic insertion of attribute quotation marks (and other things) by navigating to Tools | Options... | Text Editor | XML | Miscellaneous. The HTML editor has some similar options.

    The C# editor, however, does not offer automatic insertion of tokens like "" {} () [].

    Hope that helps,

    Damon
    Microsoft Visual C#


  • Chester R

    Yes. Thank you. I didn't realize the different language editors behaved differently. I saw it and I thought it was cool but I couldn't get it to work.

    Edwin



  • Jocker23

    EdwinSmith wrote:
    I was at an MSDN event yesterday


    Ironically I learned about an intellisense feature at a MS event too. It was the property template or prop. Type in prop, then type the tab key twice and a property field template is layed down for the user...if you don't use that one try it.


  • Boulderdude

    Apart from what others have said here I think some of what you require may be provided by some of the commercial add-ins, such as Visual Assist and ReSharper.


  • Deuce BOI

    devstuff wrote:
    OmegaMan I never knew that, works on for and if etc as well. That is really useful. Wish I knew about that ages ago now. :)


    Check out the Default Code Snippets for more hidden gems....


  • automagically adding "" {} () [] etc...