Keith Pinson
Keith Pinson

Reputation: 7995

How to keep Visual Studio autocomplete from overwriting the next word

I have a very annoying problem in Visual Studio. (My version is 2010 and I have ReSharper and VsVim installed, but I don't think that matters.) When I go to add text before some code at the beginning of some existing code, autocomplete likes to overwrite some of the existing code.

Take this example code:

initial code example

When I begin to insert some code at the beginning of the string.Format:

enter image description here

And then I use Tab to autocomplete, it overwrites string, whereas what I wanted was the autocompleted code to be inserted before string:

enter image description here

I don't want it to automatically delete the text after what I am autocompleting. If I want the text deleted, I can delete it myself very easily (particularly with VsVim). Is there any way I can prevent this behavior? I find myself working around it all the time.

Upvotes: 41

Views: 5970

Answers (3)

Michael C.
Michael C.

Reputation: 171

With Reshaper 2018.3 I found this is how to disable the behavior you're encountering

Go to Resharper -> Options -> Enviroment -> Intellisense -> Completing Characters

For the option Tab Key choose Insert instead of the default Replace

Upvotes: 17

Phil
Phil

Reputation: 77

I cured this in Visual Studio 2015 (resharper ultimate 2016.3.1) by disabling Resharper IntelliSense.

Go to...

Resharper -> Options -> Environment -> IntelliSense -> General

...and select "Visual Studio".

Upvotes: 1

azed
azed

Reputation: 154

Try using Enter or Space instead of Tab.

Upvotes: 12

Related Questions