https://github.com/programmershri/c-cpp-code-snippets-for-vs-code-extension-marketplace
Open for Contribution For Download This Extension Link Below or Just Type "programmershri.cppsnippets" in vs code extension search box
https://github.com/programmershri/c-cpp-code-snippets-for-vs-code-extension-marketplace
Last synced: 23 days ago
JSON representation
Open for Contribution For Download This Extension Link Below or Just Type "programmershri.cppsnippets" in vs code extension search box
- Host: GitHub
- URL: https://github.com/programmershri/c-cpp-code-snippets-for-vs-code-extension-marketplace
- Owner: ProgrammerShri
- License: mit
- Created: 2021-07-03T08:57:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-11T12:46:23.000Z (over 4 years ago)
- Last Synced: 2025-05-18T20:07:13.224Z (9 months ago)
- Homepage: https://marketplace.visualstudio.com/items?itemName=ProgrammerShri.cppsnippets
- Size: 181 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# C/C++ Snippets
This extension for Visual Studio Code adds snippets for C/C++.
## Usage
Type a part of the keywords in snippet e.g., "cppf" and press enter.
```cppf
// Creates a Snippets
Like : just type cppf
#include
using namespace std;
int main() {
return 0;
}
```
## How To USE This Snippet
Check Out This Video : https://www.youtube.com/watch?v=fZsXKVZzf8w
## Installation
1. Install Visual Studio Code 0.10.1 or higher
2. Launch VS Code
3. From the command palette `Ctrl`+`Shift`+`P` (Windows, Linux) or `Cmd`+`Shift`+`P` (OSX)
4. Type `ext install ProgrammerShri.cppsnippets` or just simply select `Install Extension`
5. Choose the extension - Cpp Snippets
6. Relaunch VS Code
#######################################################################################################
#######################################################################################################
## Snippets
### C Snippets
| Snippet | Description |
| ------------ | ----------------------------------- |
| `ccf` | snippet for competitive programming |
| `#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 |
### C++ Snippets
| Snippet | Description |
| --------------- | --------------------------------------- |
| `cppf` | snippet for competitive programming |
| `#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 |
## What Next ?
Simple Snippets For Including Header Libraries (Comming Soon...)
Suggest Keys (Suggestions are Welcome)
## Recommendations
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
## Suggestions for improvement are welcome