Turning back on Braces on highlighted code

Hello,

So I reinstalled my visual studio and I forgot how to make it so that when you highlight the code and type the brackets '{' it automatically puts the whole code between brackets.  { (highlighted code)  } 

I remember trying to figure out this previously and I spent so much time until I finally figured it out. I thought this time I would save myself and simply just ask.

Thanks

 

Optional Side Question: What are some of your most used features of ReSharper that you use daily? Just wondering, thanks. 

4 comments
Comment actions Permalink

Hello,

I don't think you can do that right now with ReSharper. The only option is to Alt+Enter and then select the "Surround with block" item. We plan on adding this feature in 2019.2.

0
Comment actions Permalink

I did have this feature a few days ago. So you are saying this was a Visual Studio feature? Because I turned off and on some stuff before finally getting it all set up like how I had it before this current redo.

0
Comment actions Permalink

Yes, it looks like it's a Visual Studio feature. You need to enable "Options | Text Editor | C/C++ | Advanced | Enable Surround with Braces".

0
Comment actions Permalink

Thanks that fixed that part.

Ugh! But now, when I type out a function and use the smart window it doesn't complete the (). This is a bit frustrating figuring out which needs to control what.

0

Please sign in to leave a comment.