Skip to content

Instantly share code, notes, and snippets.

@Vince0789
Last active December 9, 2021 19:08
Show Gist options
  • Save Vince0789/d457d6da1556e03bed20215754fee640 to your computer and use it in GitHub Desktop.
Save Vince0789/d457d6da1556e03bed20215754fee640 to your computer and use it in GitHub Desktop.
Snippets for vscode
{
"if": {
"prefix": "if",
"body": "if(${condition})\n{\n\t$0\n}"
},
"else": {
"prefix": "else",
"body": "else\n{\n\t$0\n}"
},
"enum": {
"prefix": "enum",
"body": "enum ${name:}\n{\n\t$0\n}"
},
"ife": {
"prefix": "if else",
"body": "if(${condition})\n{\n\t$0\n}\nelse\n{\n\t \n}"
},
"switch": {
"prefix": "switch",
"body": "switch(${var})\n{\n\tcase ${case}:\n\t{\n\t\t$0\n\t}\n}"
},
"for": {
"prefix": "for",
"body": "for(${initializer}; ${condition}; ${increment})\n{\n\t$0\n}"
},
"while": {
"prefix": "while",
"body": "while(${condition})\n{\n\t$0\n}"
},
"Insert doc block": {
"prefix": "docblock",
"body": [
"/**",
" * <summary>",
" *\t$0",
" * </summary>",
" * <param name=\"\"></param>",
" * <returns></returns>",
" */"
]
},
"Include guard": {
"prefix": "guard",
"body": [
"#if defined _inc_$TM_FILENAME_BASE",
"\t#undef _inc_$TM_FILENAME_BASE",
"#endif",
"",
"#if defined MODULE_$2",
"\t#endinput",
"#endif",
"#define MODULE_$2$0",
]
},
"Copyright": {
"prefix": "copyright",
"body": [
"/**",
" * (c) $CURRENT_YEAR - Vince0789",
" */"
]
},
"Separator": {
"prefix": "separator",
"body": "// -----------------------------------------------------------------------------"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment