Skip to content

Instantly share code, notes, and snippets.

@d8vjork
Last active July 27, 2021 14:32
Show Gist options
  • Save d8vjork/11b08bf83361a67017f15f0c3da55e03 to your computer and use it in GitHub Desktop.
Save d8vjork/11b08bf83361a67017f15f0c3da55e03 to your computer and use it in GitHub Desktop.
My VS Code snippets setup (WIP)
{
"Object property": {
"prefix": "property",
"body": [
"$BLOCK_COMMENT_START*",
" * @var ${1:mixed}",
" $BLOCK_COMMENT_END",
"${2:protected} $${3:name};"
]
},
"Inline typed variable": {
"prefix": "var",
"body": [
"$BLOCK_COMMENT_START* @var ${1:mixed} $${2} $BLOCK_COMMENT_END",
"$${2} = ${3};"
]
},
"Class file": {
"prefix": "class",
"body": [
// TODO: Add regex to get path with inverted slash
// "namespace ${RELATIVE_FILEPATH};",
"namespace ${1:App}${2};",
"",
"class ${TM_FILENAME_BASE:ClassName}${3: extends }${4}",
"{",
"\t${5:// }",
"}"
]
},
"PHPUnit file": {
"prefix": "test",
"body": [
"namespace ${1:Tests}${2};",
"",
"use ${1}\\TestCase;",
"",
"class ${TM_FILENAME_BASE:ClassName}${3: extends TestCase}${4}",
"{",
"\t${5:// }",
"}"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment