Skip to content

Instantly share code, notes, and snippets.

@sturmenta
Last active March 25, 2024 13:22
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 sturmenta/eb93a8e1367d445b2bb81f5263db05f7 to your computer and use it in GitHub Desktop.
Save sturmenta/eb93a8e1367d445b2bb81f5263db05f7 to your computer and use it in GitHub Desktop.
VSCode snippets
{
// TODO: remember: save changes of this on https://gist.github.com/sturmenta/eb93a8e1367d445b2bb81f5263db05f7
//
// ─── rust ─────────────────────────────────────────────────────────────────────────────
//
"println": {
"prefix": "prt",
"body": [
"println!(\"$1 = {:#?}\", $1);"
],
"description": "println"
},
//
// ──── js / ts ────────────────────────────────────────────────────────────────────────────
//
"normal console.log": {
"prefix": "cl",
"body": [
"console.log('$1')"
],
"description": "normal console.log"
},
"console.log": {
"prefix": "clg",
"body": [
"console.log(`$1`, $1)"
],
"description": "console.log"
},
"console.log json": {
"prefix": "clj",
"body": [
"console.log(`$1`, JSON.stringify($1, null, 2))"
],
"description": "console.log json"
},
// ────────────────────────────────────────────────────────────────────────────────
"console.log red": {
"prefix": "clgr",
"body": [
"console.log('\u001b[1;31m $1\u001b[0m'); // log in red"
],
"description": "console.log red"
},
"console.log green": {
"prefix": "clgg",
"body": [
"console.log(`\u001b[1;32m $1\u001b[0m`); // log in green"
],
"description": "console.log green"
},
"console.log yellow": {
"prefix": "clgy",
"body": [
"console.log(`\u001b[1;33m $1\u001b[0m`); // log in yellow"
],
"description": "console.log yellow"
},
// ────────────────────────────────────────────────────────────────────────────────
"react-native border style": {
"prefix": "brr",
"body": [
"borderWidth: 2,",
"borderColor: 'red',$1"
],
"description": "react-native border style"
},
"styles": {
"prefix": "st",
"body": [
"style={styles.$1}"
],
"description": "styles"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment