Skip to content

Instantly share code, notes, and snippets.

@bkhanale
Created April 12, 2019 10:16
Show Gist options
  • Save bkhanale/7b9eb3b3050ab9f12307b2a1aa9b8022 to your computer and use it in GitHub Desktop.
Save bkhanale/7b9eb3b3050ab9f12307b2a1aa9b8022 to your computer and use it in GitHub Desktop.
VS Code Snippets
{
// Place your snippets for cpp here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"codechef": {
"prefix": "chef",
"body": [
"/*",
" filename: $TM_FILENAME",
" author: bhushan_",
" created: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
"*/",
"#include <bits/stdc++.h>",
"using namespace std;",
"",
"int main() {",
" ios_base::sync_with_stdio(false); cin.tie(NULL);",
" int t; cin >> t;",
" while(t--) {",
" ",
" }",
" return 0;",
"}"
],
"description": "codechef-snippet"
},
"codejam": {
"prefix": "jam",
"body": [
"/*",
" filename: $TM_FILENAME",
" author: bhushan_",
" created: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
"*/",
"#include <bits/stdc++.h>",
"using namespace std;",
"",
"int main() {",
" ios_base::sync_with_stdio(false); cin.tie(NULL);",
" int t; cin >> t;",
" for(int tc = 1; tc <= t; tc++) {",
" cout << \"Case #\" << tc << \": \";",
" ",
" }",
" return 0;",
"}"
],
"description": "codejam-snippet"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment