Last active
October 26, 2022 05:51
-
-
Save mshafae/b65e0172902765ade70171934c4685d7 to your computer and use it in GitHub Desktop.
VS Code snippet for CSUF CPSC header format.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 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" | |
// } | |
"CPSC header": { | |
"prefix": "cpsch", | |
"body": [ | |
"// ${1:Your Name}", | |
"// CPSC ${2:120L-01}", | |
"// ${3:01}-${4:01}-${5:2022}", | |
"// ${6:your_email}@csu.fullerton.edu", | |
"// @${7:your_github_login}", | |
"//", | |
"// Lab ${8:00}-${9:00}", | |
"// Partners: $10", | |
"//", | |
"// ${11:Brief description of your C++ program.}", | |
"//", | |
"", | |
], | |
"description": "Required header for CSPC C++ lab assignments." | |
}, | |
"MS Main": { | |
"prefix": "mai", | |
"body": [ | |
"int main(int argc, char const *argv[]) {", | |
" ${1:std::cout << \"Hello World!\\n\";}", | |
" return 0;", | |
"}", | |
"", | |
], | |
"description": "Google style compliant main function." | |
}, | |
"Pound include system header": { | |
"prefix": "inc", | |
"body": [ | |
"#include <${1:iostream}>", | |
], | |
"description": "#include a system header file, defaults to iostream.", | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment