Skip to content

Instantly share code, notes, and snippets.

@jsun969
Created March 20, 2024 13:46
Show Gist options
  • Save jsun969/31ba7153bb88956cd1c9ec2ee0d53cab to your computer and use it in GitHub Desktop.
Save jsun969/31ba7153bb88956cd1c9ec2ee0d53cab to your computer and use it in GitHub Desktop.
Header guard code snippet
{
"Header guard": {
"prefix": "guard",
"body": [
"#ifndef ${1:${TM_FILENAME_BASE/(.*)/${1:/upcase}/}}_H",
"#define ${1:${TM_FILENAME_BASE/(.*)/${1:/upcase}/}}_H",
"",
"$0",
"",
"#endif // ${1:${TM_FILENAME_BASE/(.*)/${1:/upcase}/}}_H"
],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment