For stl functions, such as accumulate
, when I enter accu
, and then press tab in the pop-up candidate list, the left bracket will be automatically generated and the cursor will be placed in the middle of the bracket, as shown in Figure 1
I know visual studio or Visual Assist can do this automatically
my question is,Is there a setting to perform such completion for macro commands as well? For example, for the following macro, when I press D, D() can be automatically completed, and the cursor is placed in the middle of the brackets
#define D(x) cout << #x << " : " << x << endl;
CodePudding user response:
Enable member list commit aggressive in Tools->Options ->Text editor-> C ->Advanced, then you can use shift 9 (
instead of tab
to complete parentheses and place the cursor in the middle. Not all functions, macros need to add parentheses automatically. In addition, You can request a new feature to Developer Community and post the link here.