问题
I am working in a C project with Microsoft Visual Studio 2013, and it is performing an automatic replacement that I can't figure out how to disable.
I have a switch statement in a function that looks something like this:
A_TYPEDEF_ENUM parameter[MAX_PARAMETERS];
uint8_t numParams;
switch (value) {
case optionOne:
param[0] = thing1;
param[1] = thing2;
numParams = 2;
break;
case optionTwo:
param[0] = thing3;
numParams = 1;
break;
default:
/* handle error */
break;
}
I'm adding some new cases to this switch statement. The problem is that as I type numParams
, VS suggests operator
as a candidate for autocompletion (which doesn't make sense to me since I didn't start typing "o", "p", "e", etc., but that's beside the point). Even as I complete the variable name, the suggestion is still there, so when I hit tab to insert whitespace, it replaces my variable name with operator
.
I have seen the following questions and they don't apply, either because I don't want to completely disable autocompletion, they're trying to disable a different feature, or the languages referenced don't have the same options available as the C/C++ projects do, in Tools -> Text Editor -> [language] -> IntelliSense/Advanced:
How to disable undesirable auto-complete with Visual Studio + ReSharper?
Visual Studio 2013 VB intellisense
How to turn off brackets/quotes auto-completion in Visual Studio
How to cancel autocomplete in Visual Studio 2015 by pressing "Space"?
The Question
I don't want to disable IntelliSense and autocompletion entirely, because I use it frequently. Is there a way to disable just a specific suggestion?
来源:https://stackoverflow.com/questions/43689437/disable-specific-autocomplete-suggestion-in-visual-studio-2013