Skip to content

Instantly share code, notes, and snippets.

@dsdeur
Created April 22, 2018 09:53
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 dsdeur/6107c21e350c16b831874c44c182917b to your computer and use it in GitHub Desktop.
Save dsdeur/6107c21e350c16b831874c44c182917b to your computer and use it in GitHub Desktop.
// javascript.json
{
/* A VSCode snippet that makes it easy to time some lines of Javascript code.
*
* Usage:
* 1. Cut the lines you want to time: select, cmd + x
* 2. Type `ctime` and press enter/tab/whatever your autocomplete key is.
*/
"Wrap console time": {
"prefix": "ctime",
"body": [
"console.time('${1}');",
"$CLIPBOARD",
"console.timeEnd('${1}');",
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment