nelreina
6/14/2017 - 5:48 AM

vscode.snippets.json

  "Require Node Module": {
    "prefix": "creq",
    "body": ["const ${1:module} = require('${1:module}');"],
    "description": "Require Node Module"
  },
  "Require Local File Node Module": {
    "prefix": "cfreq",
    "body": ["const ${2:module} = require('.${1:file}');"],
    "description": "Require Node Module"
  },
  "Console Info": {
    "prefix": "cinfo",
    "body": ["console.info(`${1:info} \\${${2:var}\\}`);"],
    "description": "Console Info"
  },
{
	"Print to console": {
		"prefix": "log",
		"body": [
			"console.log('$1');",
			"$2"
		],
		"description": "Log output to console"
	},
	"Print JSON in text": {
		"prefix": "jss",
		"body": "JSON.stringify(${1:data}, null, 2)"
	},
	"Spread props": {
		"prefix": "cps",
		"body": "const { $1 } = this.props;$2"
	},
	"Print JSON in text and Pre": {
		"prefix": "pjss",
		"body": [
			"<pre>",
			"{JSON.stringify(${1:data}, null, 2)}",
			"</pre>"
		]
	},
	"React Component constructor": {
		"prefix": "ctor",
		"body": [
			"constructor(props) {",
			"super(props);",
			"this.state = {};",
			"this.${1:method} = this.${1:method}.bind(this);",
			"}"
		]
	}
}