VSCodeHow to configure C/C code automatic completion? The following article will introduce to you the method of automatically completing C/C code in VSCode. I hope it will be helpful to you!
【Recommended learning: vscode tutorial, Programming teaching】
##About VSCode's C/C code automatic completion
Step one:Need to download the C/C plug-in in VsCode
Picture: # After downloading the plug-in, it is best to restart VS.Step 2: Find the settings
Enter in the input box: editor-->Under "Text Editor" "Suggestions"-->Editor>Quick Suggestions. Set the values of the three items according to your own needs, and then click "Open Settings (json)" in the upper right corner to jump to this interface. First check whether "C_Cpp.intelliSenseEngine" is Default. If it is Disable, be sure to change it, otherwise an error prompt box will pop up in the lower left corner, prompting: "C_Cpp.intelliSenseEngine" is Disable, and there is no way to prompt The code is as follows:"C_Cpp.intelliSenseEngine": "Default"
The third step: Add part of the code to call the automatic completion function. You can combine it with some of the codes that your system already has. The code is as follows:
"C_Cpp.autocomplete": "Default", "[cpp]": { "editor.quickSuggestions": { "comments": "on", "strings": "on", "other": "on" } }, "[c]": { "editor.quickSuggestions": { "comments": "on", "strings": "on", "other": "on" } }, "editor.quickSuggestions": { "comments": "on", "strings": "on" }, "C_Cpp.codeAnalysis.exclude": { }, "settingsSync.ignoredExtensions": [
Step 4:Restart VS, create a test.c, test it to see if the auto-complete function can work, the effect is as follows:
Run successfully! You can try it yourself. Everyone’s computer usage habits are different, so some settings of everyone’s computer software are different. In fact, you can follow the system prompts and make targeted breakthroughs one by one based on the problem. That’s it! The more problems you encounter, the greater your gains will be, and you will have corresponding solutions in your mind. I have always believed that, as for computers, it is impossible to find a solution without lighting your hair. I wish everyone the best! For more knowledge about VSCode, please visit:vscode Basic Tutorial!
The above is the detailed content of How to configure C/C++ code automatic completion in VSCode [detailed graphic explanation]. For more information, please follow other related articles on the PHP Chinese website!