Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio not highlighting suggestions while typing

I use visual studio with C++. When typing a word, visual studio makes suggestions, as expected, but does not always highlight them. Here is what I mean:

I type "stri", and "string" gets highlighted, and this allows me to press enter and complete the word.

Like this.

Then, if I erase only part of the statement, it no longer highlights string,like shown here.

And finally, most importantly, if I want to use that string elsewhere, it does not highlight the name. Example.

In the example you can see that pressing enter goes to a new line instead of completing the word. Pressing tab would work, however it still doesn't highlight the word, which I don't like, and also I am used to pressing enter, so I would prefer not to press tab.

like image 271
Denis Delinger Avatar asked May 19 '18 09:05

Denis Delinger


People also ask

How do I enable autocomplete in Visual Studio?

The suggestion list of Automatic completion appears as soon as you start typing a new identifier. The suggestion list of Basic completion appears when you press the default Visual Studio IntelliSense shortcut Ctrl+Space .

Why does IntelliSense stop working?

If you find IntelliSense has stopped working, the language service may not be running. Try restarting VS Code and this should solve the issue. If you are still missing IntelliSense features after installing a language extension, open an issue in the repository of the language extension.

How do you stop text from highlighting when typing?

All you need to do after selecting the text is press Ctrl+Spacebar, which removes any explicit formatting, including the highlighting.


1 Answers

Working solution:

Go to Tools > Options > Text Editor > C/C++ > Advanced. Then find Member List Commit Aggressive. Set this to true. Then optionally find Member List Commit Characters and remove all the characters except the colon character.

This solution is almost perfect and it will work for anyone who wants to do the same thing as me.

like image 161
Denis Delinger Avatar answered Oct 24 '22 00:10

Denis Delinger