How can I stop "else" auto-inserting braces?

Hey folks! I feel like a real idiot for not figuring this out. I've tried every likely configuration setting, and none of them have any effect.

When I'm editing C# and I type "else", braces -- {} -- are automatically inserted. I never want braces to be automatically inserted. How do I disable this?


Comment actions Permalink

Never mind about this. I ended up switching back to VS Code. I miss some of Rider's intelligence, but VS Code gets out the way and lets me work in a way that Rider doesn't.

Comment actions Permalink

Hi Cariad

Sad to hear that. We will appreciate it if you some more details about what you miss in Rider. 

As to braces, one can customize the `else` template in `File | Settings | Editor | Live Templates | C#`. Choose the `else` template and remove it or edit as you wish. 

Should you have any other questions, let us know. Have a nice day! 

Comment actions Permalink

Hey Alexandra! I just wanted to say, I fired up Rider and tried out that configuration and it worked perfectly -- thank you! I'm not going to switch back, but I feel like a lot of my frustration sources from those Live Templates, and maybe I'll find an hour to go through that one day.

Thank you!


Please sign in to leave a comment.