VsCode Studio’s C/C++ code automatic completion

About VsCode Studio’s C/C++ code automatic completion

first step:Need to download VsCodeC/C++ plug-in

As shown in the picture:

After downloading the plug-in, it is best to restart VS

Step two:Find settings

Enter in the input box: editor–>”Suggestions” under “Text Editor”–>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 it.

code show as below:

“C_Cpp.intelliSenseEngine”: “Default”

third step:Add a part of code to call the auto-completion function. You can combine it with some of the code 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”: [

   

the fourth step:Restart VS, create a test.c, and test it to see if the automatic completion 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 according to the problem! 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 you all the best!

 

 

Related Posts

Unity uses XML to create a simple login system

3d object detection

OpenHarmony standard equipment application development (3) – distributed data management

vscode optimized user experience (settings | plug-ins)

20220313 Simulation Competition Summary

Ajax Advanced Chapter 02—Cross-domain and JSONP

[001] [ESP32 Development Notes] IDF project creation and CMake configuration

Unity game development: implementation of dialogue system

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*