My VS Code snippets setup (WIP)
This file contains 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
{ | |
"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