Skip to content

Instantly share code, notes, and snippets.

@glrodasz
Last active October 2, 2020 21:48
Show Gist options
  • Save glrodasz/bdcd3d39213c8a9677e72928bed361cd to your computer and use it in GitHub Desktop.
Save glrodasz/bdcd3d39213c8a9677e72928bed361cd to your computer and use it in GitHub Desktop.
Visual Studio Code Settings
[
{
"key": "cmd+right",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "cmd+left",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
{
"key": "cmd+alt+v",
"command": "toggleVim",
"when": "editorFocus"
}
]
{
"export { default }": {
"prefix": "exdef",
"body": ["export { default } from './${TM_DIRECTORY/^.+\\/(.*)$/$1/}'"],
"description": "Create a new export { default } for the current folder"
},
"React Stateless Next": {
"prefix": "rscn",
"body": "import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\n\nconst ${1:${TM_FILENAME_BASE}} = ({ ${2} }) => {\n\treturn (\n\t\t<Fragment>\n\t\t\t<div className='${3}'>\n\t\t\t\n\t\t\t</div>\n\t\t\t<style jsx>{`\n\t\t\t\t.${3} {\n\t\t\t\t\t${4}\n\t\t\t\t}\n\t\t\t`}</style>\n\t\t</Fragment>\n\t);\n};\n\n${1:${TM_FILENAME_BASE}}.propTypes = {\n\t${5}\n};\n\nexport default ${1:${TM_FILENAME_BASE}};",
"description": "Creates a stateless React component with PropTypes and ES6 module system for Next.js"
},
"React Stateless Next with Children": {
"prefix": "rscnc",
"body": "import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\n\nconst ${1:${TM_FILENAME_BASE}} = ({ children }) => {\n\treturn (\n\t\t<Fragment>\n\t\t\t<div className='${2}'>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t<style jsx>{`\n\t\t\t\t.${2} {\n\t\t\t\t\t${3}\n\t\t\t\t}\n\t\t\t`}</style>\n\t\t</Fragment>\n\t);\n};\n\n${1:${TM_FILENAME_BASE}}.propTypes = {\n\tchildren: PropTypes.node.isRequired\n};\n\nexport default ${1:${TM_FILENAME_BASE}};",
"description": "Creates a stateless React component with PropTypes and ES6 module system for Next.js with children"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment