TOM
TOM

Reputation: 13

How can I disable automatic completion with the space bar in Visual Studio 2019?

I'm using Visual Studio 2019 to create a mobile game using Unity. Sometimes, when I press space because I'm done typing a certain variable name, VS auto-completes it, and I'm looking to disable this feature.
I'd like to continue to be able to autocomplete if I hit Enter, but not Space. For example, I have a variable eS and after typing the "eS", VS gives me suggestions below:

Code Completion Suggestions

I press the space bar and my eS becomes AmbientTemperatureSensor. How can I disable this annoying feature?

Upvotes: 0

Views: 75

Answers (2)

TOM
TOM

Reputation: 13

After some experimentation, what worked for me was Tools > Options > Text Editor > Advanced and set Default Intellisense completion mode to Tab-only. The change takes effect after a restart of VS-2019.

Edit > IntelliSense > Switch between automatic and tab-only Intellisense completion also does the trick but you have to do it every time you re-open VS-2019

Upvotes: 0

Dou Xu-MSFT
Dou Xu-MSFT

Reputation: 3321

To disable autocomplete behavior when pressing space in a C++ project, you can go to Tools > Options > Text Editor > C/C++ > Advanced > IntelliSense > set “Use Aggressive Member List for Auto Member List” to “True”.

When this setting is enabled, it ensures that the Auto Member List does not complete using Member List Commit characters (such as space). Instead, it requires you to use the Tab key to commit the selection from the member list.

Upvotes: 1

Related Questions