Skip to content

Commit

Permalink
Merge pull request #1 from gabrielbarker/master
Browse files Browse the repository at this point in the history
Improve the readme
  • Loading branch information
kkonghao committed Mar 31, 2020
2 parents 540183b + 76fb2fa commit 2efd508
Show file tree
Hide file tree
Showing 4 changed files with 388 additions and 493 deletions.
61 changes: 58 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# C/C++ Dog Snippet
# C/C++ Snippets Pro

This extension for Visual Studio Code adds snippets for C/C++.

## Installation
Expand All @@ -7,13 +8,67 @@ This extension for Visual Studio Code adds snippets for C/C++.
2. Launch VS Code
3. From the command palette `Ctrl`+`Shift`+`P` (Windows, Linux) or `Cmd`+`Shift`+`P` (OSX)
4. Type `ext install` or just simply select `Install Extension`
5. Choose the extension - C/C++ Dog Snippets

5. Choose the extension - C/C++ Snippets Pro

## Usage

C/C++ Snippets Pro use Tab to change one position to another

## Snippets

### C Snippets

| 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 |

### C++ Snippets

| 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 |

## 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.

Expand Down
66 changes: 33 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"name": "Snippets",
"publisher": "2211896472",
"displayName": "C/C++ Snippets Pro",
"description": "Code snippets for C/C++",
"version": "0.1.37",
"engines": {
"vscode": "^0.10.1"
},
"categories": [
"Snippets"
],
"contributes": {
"snippets": [
{
"language": "c",
"path": "./snippets/c.json"
},
{
"language": "cpp",
"path": "./snippets/cpp.json"
}
]
},
"galleryBanner": {
"color": "#E6E0EA",
"theme": "dark"
},
"repository": {
"type": "git",
"url": "https://github.com/kkonghao/snippet-dog"
},
"icon": "images/cpp.png",
"license": "Check in License in the root folder"
"name": "snippets",
"publisher": "2211896472",
"displayName": "C/C++ Snippets Pro",
"description": "Code snippets for C/C++",
"version": "0.1.37",
"engines": {
"vscode": "^0.10.1"
},
"categories": [
"Snippets"
],
"contributes": {
"snippets": [
{
"language": "c",
"path": "./snippets/c.json"
},
{
"language": "cpp",
"path": "./snippets/cpp.json"
}
]
},
"galleryBanner": {
"color": "#E6E0EA",
"theme": "dark"
},
"repository": {
"type": "git",
"url": "https://github.com/kkonghao/snippet-dog"
},
"icon": "images/cpp.png",
"license": "Check in License in the root folder"
}
Loading

0 comments on commit 2efd508

Please sign in to comment.