Skip to content

Commit

Permalink
change #ifndef snippet to upcase
Browse files Browse the repository at this point in the history
  • Loading branch information
kkonghao committed Dec 27, 2019
1 parent 3db00dd commit 540183b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publisher": "2211896472",
"displayName": "C/C++ Snippets Pro",
"description": "Code snippets for C/C++",
"version": "0.1.34",
"version": "0.1.37",
"engines": {
"vscode": "^0.10.1"
},
Expand Down
23 changes: 12 additions & 11 deletions snippets/c.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{


"for": {
"prefix": "for",
"body": [
"body":
[
"for (int ${1} = ${2:0}; ${1} < ${3:length}; ${1}++)",
"{",
"\t$0",
Expand All @@ -12,8 +11,8 @@
"description": "Code snippet for 'for' loop"
},

"do": {
"prefix": ["do"],
"do": {
"prefix": "do",
"body":
[
"do",
Expand All @@ -34,6 +33,7 @@
],
"description": ""
},

"if": {
"prefix": "if",
"body": [
Expand All @@ -44,6 +44,7 @@
],
"description": "Code snippet for if"
},

"else": {
"prefix": "else",
"body": [
Expand Down Expand Up @@ -75,24 +76,24 @@
"description": "snippet for enum"
},


"#ifndef": {
"prefix": "#ifndef",
"body": [
"#ifndef __${TM_FILENAME_BASE}__h__",
"#define __${TM_FILENAME_BASE}__h__",
"#ifndef __${TM_FILENAME_BASE/(.*)/${1:/upcase}/}__H__",
"#define __${TM_FILENAME_BASE/(.*)/${1:/upcase}/}__H__",
"$0",
"#endif //!__${TM_FILENAME_BASE}__h__"
"#endif //!__${TM_FILENAME_BASE/(.*)/${1:/upcase}/}__H__"
],
"description": "snippet for #ifndef"
},


"#ifdef": {
"prefix": "#ifdef",
"body": [
"#ifdef $1",
"#ifdef $1",
"$0",
"#endif //$1"
"#endif //$1"
],
"description": "snippet for #if"
},
Expand Down
17 changes: 8 additions & 9 deletions snippets/cpp.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},

"do": {
"prefix": ["do"],
"prefix": "do",
"body":
[
"do",
Expand Down Expand Up @@ -117,18 +117,17 @@
},

"class inherit": {
"prefix": "clai",
"prefix": "classi",
"body": [
"class $1 :public $0",
"{",
"",
"};\n"
],
"description": "snippet for class"
"description": "snippet for class inherit"
},



"namespace": {
"prefix": "namespace",
"body": [
Expand All @@ -143,10 +142,10 @@
"#ifndef": {
"prefix": "#ifndef",
"body": [
"#ifndef __${TM_FILENAME_BASE}__h__",
"#define __${TM_FILENAME_BASE}__h__",
"#ifndef __${TM_FILENAME_BASE/(.*)/${1:/upcase}/}__H__",
"#define __${TM_FILENAME_BASE/(.*)/${1:/upcase}/}__H__",
"$0",
"#endif //!__${TM_FILENAME_BASE}__h__"
"#endif //!__${TM_FILENAME_BASE/(.*)/${1:/upcase}/}__H__"
],
"description": "snippet for #ifndef"
},
Expand All @@ -155,9 +154,9 @@
"#ifdef": {
"prefix": "#ifdef",
"body": [
"#ifdef ${1}",
"#ifdef ${1}",
"$0",
"#endif //$1"
"#endif //$1"
],
"description": "snippet for #if"
},
Expand Down

0 comments on commit 540183b

Please sign in to comment.