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.
Then, if I erase only part of the statement, it no longer highlights string,
And finally, most importantly, if I want to use that string elsewhere, it does not highlight the name.
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.
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 .
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.
All you need to do after selecting the text is press Ctrl+Spacebar, which removes any explicit formatting, including the highlighting.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With