Skip to content

Instantly share code, notes, and snippets.

@justin-endler
Last active April 4, 2018 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justin-endler/6920b3f0a3f027018188035a9068bbf4 to your computer and use it in GitHub Desktop.
Save justin-endler/6920b3f0a3f027018188035a9068bbf4 to your computer and use it in GitHub Desktop.
VS Code JavaScript User Snippet
{
"Test flag": {
"prefix": "test",
"body": [
"// @test"
],
"description": "Flag line as testing only"
},
"Todo flag": {
"prefix": "todo",
"body": [
"// @todo"
],
"description": "Flag line as todo"
},
"Debugger statement": {
"prefix": "db",
"body": [
"debugger; // @test"
],
"description": "Insert a flagged debugger statement"
},
"Console message": {
"prefix": "msg",
"body": [
"console.log(\"${1:thing}\"); // @test"
],
"description": "Log a simple static message"
},
"Console info": {
"prefix": "info",
"body": [
"console.info(\"${1:thing}\", ${1:thing}); // @test"
],
"description": "Log some data with a label"
},
"Write to file": {
"prefix": "write",
"body": [
"(function(n,c){require('fs').writeFile('/some/path/'+n+'.html',c);})('${1:c}',${1}); // @test"
],
"description": "Write some content to file."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment