Skip to content

Instantly share code, notes, and snippets.

@liebespaar93
Last active March 24, 2024 02:21
Show Gist options
  • Save liebespaar93/a2b947a094dc5c4ec3decf21bd02bbd5 to your computer and use it in GitHub Desktop.
Save liebespaar93/a2b947a094dc5c4ec3decf21bd02bbd5 to your computer and use it in GitHub Desktop.
VScode Snippet
" ============================================================================
" Netrw Directory Listing (netrw v173)
" /Users/kyoulee/Library/Application Support/Code/User/snippets
" Sorted by name
" Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:specia
" =============================================================================
../
./
cpp_orthodox_canonical_form.json
markdown_github_alerts.json
markdown_header.json
{
"HPP": {
"prefix": "HPP",
"body": [
"#ifndef ${TM_FILENAME/$|(^|[.])([^.]+)/${1:+_}${2:/upcase}/g}",
"# define ${TM_FILENAME/$|(^|[.])([^.]+)/${1:+_}${2:/upcase}/g}",
"",
"class ${1:${TM_FILENAME_BASE/[\\.]/_/g}}",
"{",
"private:",
"\t/* data */",
"",
"public:",
"\t${1:${TM_FILENAME_BASE/[\\.]/_/g}}();",
"\t${1:${TM_FILENAME_BASE/[\\.]/_/g}}(const ${1:${TM_FILENAME_BASE/[\\.]/_/g}}& ref);",
"\t~${1:${TM_FILENAME_BASE/[\\.]/_/g}}();",
"",
"\t${1:${TM_FILENAME_BASE/[\\.]/_/g}}&\toperator=(const ${1:${TM_FILENAME_BASE/[\\.]/_/g}}& ref);",
"};",
"",
"#endif",
""
],
"description": "[ kyoulee@student.42seoul.kr ] make class of {FILE_NAME}.hpp"
},
"CLASS_BASE": {
"prefix": "CLASS_BASE",
"body": [
"class ${1:${TM_FILENAME_BASE/[\\.]/_/g}}",
"{",
"private:",
"\t/* data */",
"",
"public:",
"\t${1:${TM_FILENAME_BASE/[\\.]/_/g}}();",
"\t${1:${TM_FILENAME_BASE/[\\.]/_/g}}(const ${1:${TM_FILENAME_BASE/[\\.]/_/g}}& ref);",
"\t~${1:${TM_FILENAME_BASE/[\\.]/_/g}}();",
"",
"\t${1:${TM_FILENAME_BASE/[\\.]/_/g}}&\toperator=(const ${1:${TM_FILENAME_BASE/[\\.]/_/g}}& ref);",
"};"
],
"description": "[ kyoulee@student.42seoul.kr ] make class of {NAME}"
},
"CPP": {
"prefix": "CPP",
"body": [
"#include <iostream>",
"#include <iomanip>",
"",
"#include \"${TM_FILENAME_BASE}.hpp\"",
"",
"${1:${TM_FILENAME_BASE/[\\.]/_/g}}::${1:${TM_FILENAME_BASE/[\\.]/_/g}}()",
"{",
"\tstd::cout << std::setw(15) << \"[${1:${TM_FILENAME_BASE/[\\.]/_/g}}] \" << \"create!!\" << std::endl;",
"}",
"",
"${1:${TM_FILENAME_BASE/[\\.]/_/g}}::${1:${TM_FILENAME_BASE/[\\.]/_/g}}(const ${1:${TM_FILENAME_BASE/[\\.]/_/g}}& ref)",
"{",
"\t*this=ref;",
"\tstd::cout << std::setw(15) << \"[${1:${TM_FILENAME_BASE/[\\.]/_/g}}] \" << \"copy!!\" << std::endl;",
"}",
"",
"${1:${TM_FILENAME_BASE/[\\.]/_/g}}::~${1:${TM_FILENAME_BASE/[\\.]/_/g}}()",
"{",
"\tstd::cout << std::setw(15) << \"[${1:${TM_FILENAME_BASE/[\\.]/_/g}}] \" << \"delete!!\" << std::endl;",
"}",
"",
"${1:${TM_FILENAME_BASE/[\\.]/_/g}}&\t${1:${TM_FILENAME_BASE/[\\.]/_/g}}::operator=(const ${1:${TM_FILENAME_BASE/[\\.]/_/g}}& ref)",
"{",
"\t*this=ref;",
"\tstd::cout << std::setw(15) << \"[${1:${TM_FILENAME_BASE/[\\.]/_/g}}] \" << \"operator=!!\" << std::endl;",
"\treturn (*this);",
"}",
""
],
"description": "[ kyoulee@student.42seoul.kr ] make Orthodox canonical of {FILE_NAME.cpp}"
},
"ORTHODOX": {
"prefix": "ORTHODOX",
"body": [
"${1:${TM_FILENAME_BASE/[\\.]/_/g}}::${1:${TM_FILENAME_BASE/[\\.]/_/g}}()",
"{",
"\tstd::cout << std::setw(15) << \"[${1:${TM_FILENAME_BASE/[\\.]/_/g}}] \" << \"create!!\" << std::endl;",
"}",
"",
"${1:${TM_FILENAME_BASE/[\\.]/_/g}}::${1:${TM_FILENAME_BASE/[\\.]/_/g}}(const ${1:${TM_FILENAME_BASE/[\\.]/_/g}}& ref)",
"{",
"\t*this=ref;",
"\tstd::cout << std::setw(15) << \"[${1:${TM_FILENAME_BASE/[\\.]/_/g}}] \" << \"copy!!\" << std::endl;",
"}",
"",
"${1:${TM_FILENAME_BASE/[\\.]/_/g}}::~${1:${TM_FILENAME_BASE/[\\.]/_/g}}()",
"{",
"\tstd::cout << std::setw(15) << \"[${1:${TM_FILENAME_BASE/[\\.]/_/g}}] \" << \"delete!!\" << std::endl;",
"}",
"",
"${1:${TM_FILENAME_BASE/[\\.]/_/g}}&\t${1:${TM_FILENAME_BASE/[\\.]/_/g}}::operator=(const ${1:${TM_FILENAME_BASE/[\\.]/_/g}}& ref)",
"{",
"\t*this=ref;",
"\tstd::cout << std::setw(15) << \"[${1:${TM_FILENAME_BASE/[\\.]/_/g}}] \" << \"operator=!!\" << std::endl;",
"\treturn (*this);",
"}",
""
],
"description": "[ kyoulee@student.42seoul.kr ] make Orthodox canonical of {NAME}"
}
}
{
"fucking won sign": {
"prefix": "₩₩₩",
"body": [
"```${1: }```"
]
}
}
{
"github alerts note": {
"prefix": "Note",
"body": [
"> [!NOTE]",
"> ",
]
},
"github alerts tip": {
"prefix": "Tip",
"body": [
"> [!TIP]",
"> ",
]
},
"github alerts important": {
"prefix": "Important",
"body": [
"> [!IMPORTANT]",
"> ",
]
},
"github alerts warning": {
"prefix": "Warning",
"body": [
"> [!WARNING]",
"> ",
]
},
"github alerts caution": {
"prefix": "Caution",
"body": [
"> [!CAUTION]",
"> ",
]
}
}
{
"File header": {
"prefix": "header",
"body": [
"---",
"title: $TM_FILENAME",
"description: |-",
" 내용입력",
"date: ${date:Insert datetime string (⇧⌘I or Ctrl+Shift+I)}"
"preview: 이미지 주소",
"draft: false",
"tags:",
" - 테그없음",
"categories:",
" - 카테고리없음",
"---"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment