Skip to content

Instantly share code, notes, and snippets.

@poulet42
Created July 31, 2017 06:33
Show Gist options
  • Save poulet42/fe18b03653bd56ef9786f597d472976c to your computer and use it in GitHub Desktop.
Save poulet42/fe18b03653bd56ef9786f597d472976c to your computer and use it in GitHub Desktop.
{
/*
// Place your snippets for Javascript (Babel) here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
"reactReduxComponent": {
"prefix": "rrc",
"body": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\nfunction mapStateToProps(state) {\n\treturn {\n\n\t};\n}\n\nclass ${1:componentName} extends Component {\n\trender() {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t$0\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default connect(\n\tmapStateToProps,\n)(${1:componentName});",
"description": "Creates a React component class connected to redux"
},
"importFrom": {
"prefix": "from",
"body": "import { ${1:resource} } from '${2:library}';"
},
"importAs": {
"prefix": "as",
"body": "import { ${1:resource} } as ${2:alias} from '${3:library}';"
}
}
// Placez vos combinaisons de touches dans ce fichier pour remplacer les valeurs par défaut
[
{
"key": "cmd+/",
"command": "editor.action.reindentlines"
},
{
"key": "ctrl+2",
"command": "workbench.action.focusSecondEditorGroup"
},
{
"key": "cmd+2",
"command": "-workbench.action.focusSecondEditorGroup"
},
{
"key": "ctrl+1",
"command": "workbench.action.focusFirstEditorGroup"
},
{
"key": "cmd+1",
"command": "-workbench.action.focusFirstEditorGroup"
},
{
"key": "ctrl+3",
"command": "workbench.action.focusThirdEditorGroup"
},
{
"key": "cmd+3",
"command": "-workbench.action.focusThirdEditorGroup"
},
{
"key": "ctrl+f",
"command": "workbench.action.terminal.focusFindWidget",
"when": "terminalFocus"
},
{
"key": "cmd+f",
"command": "-workbench.action.terminal.focusFindWidget",
"when": "terminalFocus"
},
{
"key": "cmd+1",
"command": "workbench.action.openEditorAtIndex1"
},
{
"key": "ctrl+1",
"command": "-workbench.action.openEditorAtIndex1"
},
{
"key": "cmd+2",
"command": "workbench.action.openEditorAtIndex2"
},
{
"key": "ctrl+2",
"command": "-workbench.action.openEditorAtIndex2"
},
{
"key": "cmd+3",
"command": "workbench.action.openEditorAtIndex3"
},
{
"key": "ctrl+3",
"command": "-workbench.action.openEditorAtIndex3"
},
{
"key": "cmd+4",
"command": "workbench.action.openEditorAtIndex4"
},
{
"key": "ctrl+4",
"command": "-workbench.action.openEditorAtIndex4"
},
{
"key": "cmd+5",
"command": "workbench.action.openEditorAtIndex5"
},
{
"key": "ctrl+5",
"command": "-workbench.action.openEditorAtIndex5"
},
{
"key": "cmd+6",
"command": "workbench.action.openEditorAtIndex6"
},
{
"key": "ctrl+6",
"command": "-workbench.action.openEditorAtIndex6"
},
{
"key": "cmd+7",
"command": "workbench.action.openEditorAtIndex7"
},
{
"key": "ctrl+7",
"command": "-workbench.action.openEditorAtIndex7"
},
{
"key": "cmd+8",
"command": "workbench.action.openEditorAtIndex8"
},
{
"key": "ctrl+8",
"command": "-workbench.action.openEditorAtIndex8"
},
{
"key": "cmd+9",
"command": "workbench.action.openEditorAtIndex9"
},
{
"key": "ctrl+9",
"command": "-workbench.action.openEditorAtIndex9"
},
{
"key": "cmd+k cmd+b",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+\\",
"command": "react.beautify"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment