This extension for Visual Studio Code adds snippets for C/C++.
- Install Visual Studio Code
- Launch VS Code
- From the command palette Ctrl+Shift+P(Windows, Linux) orCmd+Shift+P(OSX)
- Type ext installor just simply selectInstall Extension
- Choose the extension - C/C++ Snippets Pro
C/C++ Snippets Pro use Tab to change one position to another
| Snippet | Description | 
|---|---|
| #def | snippet for #define | 
| #ifdef | snippet for #if | 
| #ifndef | snippet for #ifndef | 
| #inc | snippet for #include | 
| case | snippet for case (...) | 
| do | snippet for a do...while loop | 
| else | snippet for else | 
| else if | snippet for else-if | 
| enum | snippet for an enum declaration | 
| fileheader | snippet for a file header | 
| for | snippet for a for loop | 
| if | snippet for an if statement | 
| main | snippet for a main function | 
| struct | snippet for a struct declaration | 
| switch | snippet for a switch statement | 
| union | snippet for a union declaration | 
| while | snippet for a while loop | 
| Snippet | Description | 
|---|---|
| #def | snippet for #def | 
| #ifdef | snippet for #if | 
| #ifndef | snippet for #ifndef | 
| #inc | snippet for #include | 
| case | snippet for case (...) | 
| class | snippet for a class declaration | 
| class inherit | snippet for a class-inherit declaration | 
| do | snippet for a do...while loop | 
| else | snippet for else | 
| else if | snippet for else-if | 
| enum | snippet for an enum declaration | 
| fileheader | snippet for a file header | 
| for | snippet for a for loop | 
| foreach | snippet for a for-auto loop | 
| if | snippet for an if statement | 
| main | snippet for a main function declaration | 
| namespace | undefined | 
| struct | snippet for a struct declaration | 
| switch | snippet for a switch statement | 
| template | snippet for a template | 
| try | snippet for a try-catch block | 
| union | snippet for a union declaration | 
| using | snippet for using namespace | 
| while | snippet for a while loop | 
In order to give you a perfect plugin experience and avoid conflict with C/C++ Microsoft edition's snippet, I recommend you turn off C/C++ Microsoft edition's snippet. Details can be find in the below.
Settings/Extensions/ C or C++/ C_CPP:Suggest Snippets