Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 700
Keith Pinson Avatar asked Feb 27 '14 17:02

Keith Pinson


People also ask

How do I turn off overtype in Visual Studio?

Go to Visual Studio Code's settings and type "overtype" in the search bar, and set it to 'never'.

How do I change autocomplete in Visual Studio?

Go to Tools | Options | Text Editor | C/C++. This dialog displays a window that allows you to toggle Automatic brace completion. Automatic brace completion is the feature where, when you type { , a corresponding } is automatically typed for you.


2 Answers

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

like image 90
Michael C. Avatar answered Sep 28 '22 02:09

Michael C.


Try using Enter or Space instead of Tab.

like image 45
azed Avatar answered Sep 28 '22 03:09

azed