Timothy Blaisdell
Timothy Blaisdell

Reputation: 137

Whys doesn't Visual Studio skip auto-entered closing paren when I type over it?

I'm a longtime user of Visual Studio and Resharper, but have recently upgraded both (VS 2015, Resharper 2016.2).

For years now, when I am typing along in VS, and I enter an opening brace or paren or quote, it inserts the closing one just after, and leaves the cursor where it is so I can type the parameters or whatever in between. That's all great, and I like that, but normally when I get around to typing the closing paren/brace/quote, it doesn't actually insert it, but just skips over the one that's already there.

Now suddenly VS has stopped doing this. When I type the closing character, it inserts it, oblivious to the fact that it's already there. Since I'm a pretty fast typist and have been doing this for years, It's very annoying to have to unlearn this behavior and relearn a new behavior.

As I said, I've just upgraded both VS and Resharper, so I don't know which is the source of this problem, or which might have a new option to control this behavior.

Can anyone help here? I just want it to go back to doing it the way it's always done it.

EDIT: After a bit of testing, I've realized that things still work right for curly-braces. That is, if I position my cursor over a closing curly-brace, and type a closing curly-brace, it will just skip over the one that's there. However, this does not work for parentheses, square-brackets, or quotes.

Upvotes: 1

Views: 266

Answers (1)

Timothy Blaisdell
Timothy Blaisdell

Reputation: 137

Ok, I figured this out. Posting this answer in case anyone else has this problem.

To fix the problem, I did the following:

  1. Go to Resharper options -> Editor -> Editor behavior -> Auto-insert pair brackets, parentheses and quotes.
  2. The setting above was unchecked. Apparently similar settings in Visual Studio itself were hiding the fact that this was disabled in Resharper. I enabled this feature.
  3. This made everything revert back to previous behavior. It seems that if Resharper is not configured to auto-insert the closing symbol, it will not assume that it should skip over it when you type over it, even if VS settings are configured to auto-insert the closing symbol.

Upvotes: 0

Related Questions