Last active
June 6, 2019 20:39
-
-
Save shovanch/bae54beac7316bbbc288a8b9c83f54db to your computer and use it in GitHub Desktop.
Visual Studio Code Settings Sync Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2019-06-06T20:39:17.239Z","extensionVersion":"v3.2.9"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"metadata": { | |
"id": "d3836729-9cc1-42c1-b2af-d50071f57d29", | |
"publisherId": "formulahendry.auto-close-tag", | |
"publisherDisplayName": "formulahendry" | |
}, | |
"name": "auto-close-tag", | |
"publisher": "formulahendry", | |
"version": "0.5.6" | |
}, | |
{ | |
"metadata": { | |
"id": "6e440e71-8ed9-4f25-bb78-4b13096b8a03", | |
"publisherId": "formulahendry.auto-rename-tag", | |
"publisherDisplayName": "formulahendry" | |
}, | |
"name": "auto-rename-tag", | |
"publisher": "formulahendry", | |
"version": "0.1.0" | |
}, | |
{ | |
"metadata": { | |
"id": "7a0110bb-231a-4598-aa1b-0769ea46d28b", | |
"publisherId": "aaron-bond.better-comments", | |
"publisherDisplayName": "aaron-bond" | |
}, | |
"name": "better-comments", | |
"publisher": "aaron-bond", | |
"version": "2.0.5" | |
}, | |
{ | |
"metadata": { | |
"id": "f583eafd-aa0d-4ccb-8f44-d1e610389660", | |
"publisherId": "CoenraadS.bracket-pair-colorizer", | |
"publisherDisplayName": "CoenraadS" | |
}, | |
"name": "bracket-pair-colorizer", | |
"publisher": "CoenraadS", | |
"version": "1.0.61" | |
}, | |
{ | |
"metadata": { | |
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd", | |
"publisherId": "Shan.code-settings-sync", | |
"publisherDisplayName": "Shan" | |
}, | |
"name": "code-settings-sync", | |
"publisher": "Shan", | |
"version": "3.2.9" | |
}, | |
{ | |
"metadata": { | |
"id": "121396ad-85a1-45ec-9fd1-d95028a847f5", | |
"publisherId": "naumovs.color-highlight", | |
"publisherDisplayName": "naumovs" | |
}, | |
"name": "color-highlight", | |
"publisher": "naumovs", | |
"version": "2.3.0" | |
}, | |
{ | |
"metadata": { | |
"id": "65abbd6a-7cef-4719-92e6-661f0d2f2121", | |
"publisherId": "jack89ita.copy-filename", | |
"publisherDisplayName": "jack89ita" | |
}, | |
"name": "copy-filename", | |
"publisher": "jack89ita", | |
"version": "2.1.2" | |
}, | |
{ | |
"metadata": { | |
"id": "52558343-5a42-4090-b5a2-fa7a47b5ce39", | |
"publisherId": "CoenraadS.disableligatures", | |
"publisherDisplayName": "CoenraadS" | |
}, | |
"name": "disableligatures", | |
"publisher": "CoenraadS", | |
"version": "0.0.8" | |
}, | |
{ | |
"metadata": { | |
"id": "f60a60a6-95ba-42d4-b41c-3d24c1b89588", | |
"publisherId": "EditorConfig.EditorConfig", | |
"publisherDisplayName": "EditorConfig" | |
}, | |
"name": "EditorConfig", | |
"publisher": "EditorConfig", | |
"version": "0.13.0" | |
}, | |
{ | |
"metadata": { | |
"id": "1b625615-bded-4797-9806-079abcacfcc1", | |
"publisherId": "letrieu.expand-region", | |
"publisherDisplayName": "letrieu" | |
}, | |
"name": "expand-region", | |
"publisher": "letrieu", | |
"version": "0.1.2" | |
}, | |
{ | |
"metadata": { | |
"id": "be992f3f-9f22-4b66-a1d2-ecad04c28a28", | |
"publisherId": "abusaidm.html-snippets", | |
"publisherDisplayName": "abusaidm" | |
}, | |
"name": "html-snippets", | |
"publisher": "abusaidm", | |
"version": "0.2.1" | |
}, | |
{ | |
"metadata": { | |
"id": "98790d67-10fa-497c-9113-f6c7489207b2", | |
"publisherId": "yzhang.markdown-all-in-one", | |
"publisherDisplayName": "yzhang" | |
}, | |
"name": "markdown-all-in-one", | |
"publisher": "yzhang", | |
"version": "2.3.1" | |
}, | |
{ | |
"metadata": { | |
"id": "5cbdf58a-694a-4aba-af08-61d00842eb03", | |
"publisherId": "bierner.markdown-preview-github-styles", | |
"publisherDisplayName": "bierner" | |
}, | |
"name": "markdown-preview-github-styles", | |
"publisher": "bierner", | |
"version": "0.1.6" | |
}, | |
{ | |
"metadata": { | |
"id": "5db78037-f674-459f-a236-db622c427c5b", | |
"publisherId": "PKief.material-icon-theme", | |
"publisherDisplayName": "PKief" | |
}, | |
"name": "material-icon-theme", | |
"publisher": "PKief", | |
"version": "3.8.0" | |
}, | |
{ | |
"metadata": { | |
"id": "03b96169-4c19-4c9e-ada8-d5d208ebe80e", | |
"publisherId": "philsinatra.nested-comments", | |
"publisherDisplayName": "philsinatra" | |
}, | |
"name": "nested-comments", | |
"publisher": "philsinatra", | |
"version": "2.3.1" | |
}, | |
{ | |
"metadata": { | |
"id": "0d1241e3-fa60-4f24-8f2a-6d7085677c48", | |
"publisherId": "ionutvmi.path-autocomplete", | |
"publisherDisplayName": "ionutvmi" | |
}, | |
"name": "path-autocomplete", | |
"publisher": "ionutvmi", | |
"version": "1.13.3" | |
}, | |
{ | |
"metadata": { | |
"id": "96fa4707-6983-4489-b7c5-d5ffdfdcce90", | |
"publisherId": "esbenp.prettier-vscode", | |
"publisherDisplayName": "esbenp" | |
}, | |
"name": "prettier-vscode", | |
"publisher": "esbenp", | |
"version": "1.9.0" | |
}, | |
{ | |
"metadata": { | |
"id": "f1f59ae4-9318-4f3c-a9b5-81b2eaa5f8a5", | |
"publisherId": "ms-python.python", | |
"publisherDisplayName": "ms-python" | |
}, | |
"name": "python", | |
"publisher": "ms-python", | |
"version": "2019.5.18678" | |
}, | |
{ | |
"metadata": { | |
"id": "e8b469bd-915d-4070-bfc2-05c9b546f8ee", | |
"publisherId": "jakob101.RelativePath", | |
"publisherDisplayName": "jakob101" | |
}, | |
"name": "RelativePath", | |
"publisher": "jakob101", | |
"version": "1.4.0" | |
}, | |
{ | |
"metadata": { | |
"id": "dffaf5a1-2219-434b-9d87-cb586fd59260", | |
"publisherId": "Equinusocio.vsc-material-theme", | |
"publisherDisplayName": "Equinusocio" | |
}, | |
"name": "vsc-material-theme", | |
"publisher": "Equinusocio", | |
"version": "2.9.0" | |
}, | |
{ | |
"metadata": { | |
"id": "583b2b34-2c1e-4634-8c0b-0b82e283ea3a", | |
"publisherId": "dbaeumer.vscode-eslint", | |
"publisherDisplayName": "dbaeumer" | |
}, | |
"name": "vscode-eslint", | |
"publisher": "dbaeumer", | |
"version": "1.9.0" | |
}, | |
{ | |
"metadata": { | |
"id": "0808d236-6faf-4f68-9f17-28f51a572ee4", | |
"publisherId": "deerawan.vscode-faker", | |
"publisherDisplayName": "deerawan" | |
}, | |
"name": "vscode-faker", | |
"publisher": "deerawan", | |
"version": "1.3.0" | |
}, | |
{ | |
"metadata": { | |
"id": "032ccf0d-9c21-43a5-8073-ae28e453ecef", | |
"publisherId": "whtouche.vscode-js-console-utils", | |
"publisherDisplayName": "whtouche" | |
}, | |
"name": "vscode-js-console-utils", | |
"publisher": "whtouche", | |
"version": "0.7.0" | |
}, | |
{ | |
"metadata": { | |
"id": "3c6d2422-afcc-482d-a751-08c6ed38ce19", | |
"publisherId": "wmaurer.vscode-jumpy", | |
"publisherDisplayName": "wmaurer" | |
}, | |
"name": "vscode-jumpy", | |
"publisher": "wmaurer", | |
"version": "0.3.1" | |
}, | |
{ | |
"metadata": { | |
"id": "dd5a2c83-ad8c-4839-a529-0644e5acb646", | |
"publisherId": "mgmcdermott.vscode-language-babel", | |
"publisherDisplayName": "mgmcdermott" | |
}, | |
"name": "vscode-language-babel", | |
"publisher": "mgmcdermott", | |
"version": "0.0.22" | |
}, | |
{ | |
"metadata": { | |
"id": "03b20f74-9504-4130-a12f-af9808985b37", | |
"publisherId": "Rubymaniac.vscode-paste-and-indent", | |
"publisherDisplayName": "Rubymaniac" | |
}, | |
"name": "vscode-paste-and-indent", | |
"publisher": "Rubymaniac", | |
"version": "0.0.8" | |
}, | |
{ | |
"metadata": { | |
"id": "69ddd764-339a-4ecc-97c1-9c4ece58e36d", | |
"publisherId": "GitHub.vscode-pull-request-github", | |
"publisherDisplayName": "GitHub" | |
}, | |
"name": "vscode-pull-request-github", | |
"publisher": "GitHub", | |
"version": "0.8.0" | |
}, | |
{ | |
"metadata": { | |
"id": "6f5d4f30-67aa-4151-80c0-1bbe8ca5f9db", | |
"publisherId": "cssho.vscode-svgviewer", | |
"publisherDisplayName": "cssho" | |
}, | |
"name": "vscode-svgviewer", | |
"publisher": "cssho", | |
"version": "2.0.0" | |
}, | |
{ | |
"metadata": { | |
"id": "f2fd462f-f1bd-4c62-b54f-59a4e5ffc6a3", | |
"publisherId": "WakaTime.vscode-wakatime", | |
"publisherDisplayName": "WakaTime" | |
}, | |
"name": "vscode-wakatime", | |
"publisher": "WakaTime", | |
"version": "2.1.2" | |
}, | |
{ | |
"metadata": { | |
"id": "876e8f93-74d0-4f4f-91b7-34a09f19f444", | |
"publisherId": "VisualStudioExptTeam.vscodeintellicode", | |
"publisherDisplayName": "VisualStudioExptTeam" | |
}, | |
"name": "vscodeintellicode", | |
"publisher": "VisualStudioExptTeam", | |
"version": "1.1.6" | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": ".", | |
"command": "" | |
}, | |
{ | |
"key": "shift+enter", | |
"command": "extension.jumpy-word", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "Escape", | |
"command": "extension.jumpy-exit", | |
"when": "editorTextFocus && jumpy.isJumpyMode" | |
}, | |
{ | |
"key": "ctrl+v", | |
"command": "editor.action.clipboardPasteAction", | |
"when": "!editorTextFocus" | |
}, | |
{ | |
"key": "ctrl+v", | |
"command": "editor.action.clipboardPasteAction", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+v", | |
"command": "pasteAndIndent.action", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+alt+up", | |
"command": "expand_region" | |
}, | |
{ | |
"key": "ctrl+alt+down", | |
"command": "undo_expand_region" | |
}, | |
{ | |
"key": "ctrl+e", | |
"command": "workbench.action.focusActiveEditorGroup" | |
}, | |
{ | |
"key": "ctrl+shift+/", | |
"command": "editor.action.blockComment", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "shift+alt+a", | |
"command": "-editor.action.blockComment", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+,", | |
"command": "editor.emmet.action.wrapWithAbbreviation", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+`", | |
"command": "workbench.action.terminal.focus" | |
}, | |
{ | |
"key": "ctrl+shift+`", | |
"command": "workbench.action.focusActiveEditorGroup", | |
"when": "terminalFocus" | |
}, | |
{ | |
"key": "ctrl+alt+right", | |
"command": "cursorWordPartRight", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "ctrl+shift+alt+right", | |
"command": "cursorWordPartRightSelect", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "ctrl+alt+left", | |
"command": "cursorWordPartStartLeft", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "ctrl+shift+alt+left", | |
"command": "cursorWordPartStartLeftSelect", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "ctrl+alt+backspace", | |
"command": "deleteWordPartLeft", | |
"when": "textInputFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+alt+backspace", | |
"command": "deleteWordPartRight", | |
"when": "textInputFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+[", | |
"command": "workbench.action.terminal.focusNext" | |
}, | |
{ | |
"key": "ctrl+shift+]", | |
"command": "workbench.action.terminal.focusPrevious" | |
}, | |
{ | |
"key": "ctrl+g ctrl+c", | |
"command": "git.commitAll" | |
}, | |
{ | |
"key": "ctrl+alt+l", | |
"command": "editor.action.selectHighlights", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+shift+l", | |
"command": "-editor.action.selectHighlights", | |
"when": "editorFocus" | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Empty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "material-icon-theme", | |
"version": "2.1.0" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* ***EDITOR SETTINGS*** */ | |
"editor.fontFamily": "Operator Mono Lig", | |
"editor.fontSize": 16, | |
"editor.fontLigatures": true, | |
"editor.lineHeight": 28, | |
"editor.cursorWidth": 3, | |
"editor.tabSize": 2, | |
"editor.snippetSuggestions": "top", | |
"editor.quickSuggestions": { | |
"other": true, | |
"strings": true | |
}, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.formatOnPaste": true, | |
"editor.smoothScrolling": true, | |
"editor.wordWrap": "on", | |
"editor.formatOnSave": true, | |
"editor.minimap.enabled": false, | |
"editor.occurrencesHighlight": false, | |
"editor.emptySelectionClipboard": false, | |
"editor.quickSuggestionsDelay": 0, | |
"editor.renderIndentGuides": true, | |
"editor.fontWeight": "400", | |
"editor.autoIndent": true, | |
// "typescript.useCodeSnippetsOnMethodSuggest": true, | |
"[python]": { | |
"editor.tabSize": 4 | |
}, | |
// "editor.minimap.renderCharacters": true, | |
// "editor.letterSpacing": 0.5, | |
// "editor.cursorBlinking": "solid", | |
/* ***WORKSPACE SETTINGS*** */ | |
"workbench.activityBar.visible": false, | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.statusBar.visible": true, | |
"workbench.startupEditor": "newUntitledFile", | |
"workbench.colorTheme": "Material Theme Ocean High Contrast", | |
"workbench.editor.tabSizing": "shrink", | |
"workbench.statusBar.feedback.visible": false, | |
"workbench.sideBar.location": "right", | |
/* ***FILES AND WINDOWS*** */ | |
"window.menuBarVisibility": "toggle", | |
"files.trimTrailingWhitespace": true, | |
"window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}", | |
"files.exclude": { | |
"**/.git": true, | |
"**/.svn": true, | |
"**/.DS_Store": true, | |
"**/node_modules": true, | |
"**/.idea": true, | |
"**/.vscode": false, | |
"**/yarn.lock": true, | |
"**/tmp": true, | |
"**/.cache": true | |
}, | |
"files.watcherExclude": { | |
"**/.git/objects/**": true, | |
"**/node_modules/**": true, | |
"**/tmp": true | |
}, | |
"emmet.includeLanguages": { | |
"javascript": "javascriptreact" | |
}, | |
"search.exclude": { | |
"**/node_modules": true, | |
"**/bower_components": true, | |
"**/.git": true, | |
"**/.DS_Store": true, | |
"**/tmp": true, | |
"**/coverage": true, | |
"**/ios": true, | |
"**/android": true, | |
"_build": true, | |
"deps": true, | |
"**/package-lock.json": true, | |
"**/build": true, | |
"**/public": true, | |
"**/.cache": true | |
}, | |
"files.autoSave": "off", | |
"files.insertFinalNewline": true, | |
"files.eol": "\n", | |
"window.zoomLevel": 0, | |
"explorer.openEditors.visible": 0, | |
"window.titleBarStyle": "custom", | |
/* ***SYNC*** */ | |
"sync.autoDownload": false, | |
"sync.autoUpload": false, | |
// "sync.lastDownload": "", | |
"sync.forceDownload": false, | |
// "sync.host": "", | |
// "sync.pathPrefix": "", | |
"sync.quietSync": false, | |
"sync.askGistName": true, | |
"sync.removeExtensions": true, | |
"sync.syncExtensions": true, | |
"sync.gist": "bae54beac7316bbbc288a8b9c83f54db", | |
// "sync.lastUpload": "2018-07-14T10:39:48.391Z", | |
/* ***GIT*** */ | |
"git.enableSmartCommit": true, | |
"git.ignoreMissingGitWarning": true, | |
"git.autofetch": false, | |
/* ***TERMINAL */ | |
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe", | |
"terminal.integrated.fontSize": 15, | |
"terminal.integrated.lineHeight": 1.1, | |
"terminal.integrated.cursorBlinking": false, | |
"terminal.integrated.cursorStyle": "line", | |
/* ***EXTENSIONS*** */ | |
"disableLigatures.mode": "Cursor", | |
"color-highlight.markRuler": false, | |
"scss.validate": false, | |
"prettier.disableLanguages": ["vue", "markdown"], | |
"extensions.showRecommendationsOnlyOnDemand": true, | |
// for prettier-integration | |
"eslint.enable": true, | |
"prettier.eslintIntegration": true, | |
"javascript.format.enable": false, | |
"prettier.stylelintIntegration": true, | |
// "vscode_custom_css.imports": ["file://D:/Softwares/vs-custom.css"], | |
"auto-rename-tag.activationOnLanguage": [ | |
"html", | |
"javascript", | |
"javascriptreact" | |
], | |
"eslint.run": "onSave", | |
// "vscode_custom_css.policy": true, | |
// "materialTheme.accentPrevious": "", | |
// "materialTheme.fixIconsRunning": false, | |
"workbench.colorCustomizations": { | |
"editor.background": "#090B10", | |
"editorGroupHeader.tabsBackground": "#090B10", | |
"tab.inactiveBackground": "#090B10", | |
"activityBarBadge.background": "#80CBC4", | |
"list.activeSelectionForeground": "#80CBC4", | |
"list.inactiveSelectionForeground": "#80CBC4", | |
"list.highlightForeground": "#80CBC4", | |
"scrollbarSlider.activeBackground": "#80CBC450", | |
"editorSuggestWidget.highlightForeground": "#80CBC4", | |
"textLink.foreground": "#80CBC4", | |
"progressBar.background": "#80CBC4", | |
"pickerGroup.foreground": "#80CBC4", | |
"tab.activeBorder": "#80CBC4", | |
"notificationLink.foreground": "#80CBC4", | |
"editorWidget.border": "#80CBC4" | |
}, | |
"materialTheme.accent": "Teal", | |
"breadcrumbs.enabled": true, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.tabCompletion": "on", | |
"editor.suggest.localityBonus": true, | |
"workbench.editor.highlightModifiedTabs": true, | |
"editor.cursorSmoothCaretAnimation": true, | |
"python.pythonPath": "C:\\Users\\Shovan\\AppData\\Local\\Programs\\Python\\Python37-32\\python.exe", | |
"python.jediEnabled": false, | |
"terminal.integrated.windowsEnableConpty": true, | |
"editor.suggestSelection": "first", | |
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", | |
"terminal.integrated.rendererType": "dom", | |
"[html]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"workbench.iconExploration.enabled": true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// DISABLED SNIPPETS | |
/* | |
"prototype method": { | |
"prefix": "proto", | |
"body": [ | |
"${1:ClassName}.prototype.${2:key} = ${3:value}" | |
], | |
"description": "prototype method" | |
}, | |
" Promise.then": { | |
"prefix": "then", | |
"body": [ | |
"${1:promise}.then((${2:value}) => {${0}})" | |
], | |
"description": " Promise.then" | |
}, | |
"fetch API call": { | |
"prefix": "fetch", | |
"body": [ | |
"fetch(${1:endpoint})", | |
"\t.then(res => res.json())", | |
"\t.then(${2:function});", | |
], | |
"description": "fetch API call" | |
}, | |
"exportClass": { | |
"prefix": "ecl", | |
"body": "export default class ${1:className} {\n\t$0\n}\n", | |
"description": "Export default class in ES6 syntax" | |
}, | |
"exportClassExtends": { | |
"prefix": "ece", | |
"body": "export default class ${1:className} extends ${2:baseclassName} {\n\t$0\n}\n", | |
"description": "Export default class which extends a base one in ES6 syntax" | |
}, | |
"constructor": { | |
"prefix": "con", | |
"body": "constructor(${1:params}) {\n\t${0}\n}", | |
"description": "Add default constructor in a class in ES6 syntax" | |
}, | |
"method": { | |
"prefix": "metd", | |
"body": "${1:method}(${2:params}) {\n\t${0}\n}", | |
"description": "Creates a method inside a class in ES6 syntax" | |
}, | |
"addEventListener": { | |
"prefix": "ae", | |
"body": [ | |
"${1:document}.addEventListener('${2:event}', (${3:params}) => {", | |
"\t${4:// body}", | |
"});" | |
], | |
"description": "Code snippet for \"addEventListener\"" | |
}, | |
"appendChild": { | |
"prefix": "ac", | |
"body": [ | |
"${1:document}.appendChild(${2:elem});" | |
], | |
"description": "Code snippet for \"appendChild\"" | |
}, | |
"removeChild": { | |
"prefix": "rc", | |
"body": [ | |
"${1:document}.removeChild(${2:elem});" | |
], | |
"description": "Code snippet for \"removeChild\"" | |
}, | |
"createElement": { | |
"prefix": "cel", | |
"body": [ | |
"${1:document}.createElement(${2:elem});" | |
], | |
"description": "Code snippet for \"createElement\"" | |
}, | |
"createDocumentFragment": { | |
"prefix": "cdf", | |
"body": [ | |
"${1:document}.createDocumentFragment();$2" | |
], | |
"description": "Code snippet for \"createDocumentFragment\"" | |
}, | |
"classList.add": { | |
"prefix": "cad", | |
"body": [ | |
"${1:document}.classList.add('${2:class}');" | |
], | |
"description": "Code snippet for \"classList.add\"" | |
}, | |
"classList.toggle": { | |
"prefix": "ct", | |
"body": [ | |
"${1:document}.classList.toggle('${2:class}');" | |
], | |
"description": "Code snippet for \"classList.toggle\"" | |
}, | |
"classList.remove": { | |
"prefix": "cr", | |
"body": [ | |
"${1:document}.classList.remove('${2:class}');" | |
], | |
"description": "Code snippet for \"classList.remove\"" | |
}, | |
"Simple React Component": { | |
"prefix": "recp", | |
"body": [ | |
"class ${1:Name} extends React.Component {", | |
"\t", | |
"\t render() {", | |
"\t\t//${2:Code}", | |
"}", | |
"}" | |
], | |
"description": "Code snippet for a simple React Component" | |
}, | |
"setState": { | |
"prefix": "ess", | |
"body": [ | |
"this.setState(($1) => ({ $2: $3 }));" | |
], | |
"description": "setState" | |
}, | |
"Constructor with state": { | |
"prefix": "cps", | |
"body": [ | |
"\tconstructor(props) {", | |
"\t\tsuper(props);", | |
"\t\tthis.state = { $2 }", | |
"\t}", | |
], | |
"description": "Constructor with state" | |
}, | |
*/ | |
// BASIC SNIPPETS | |
"let variable declaration": { | |
"prefix": "l", | |
"body": [ | |
"let ${1:name} " | |
], | |
"description": "let variable declaration", | |
}, | |
"let assignment": { | |
"prefix": "la", | |
"body": [ | |
"let ${1:name} = ${2:value}" | |
], | |
"description": "let assignment" | |
}, | |
"const variable declaration": { | |
"prefix": "co", | |
"body": [ | |
"const ${1:name} " | |
], | |
"description": "const variable declaration" | |
}, | |
"const variable assignment": { | |
"prefix": "ca", | |
"body": [ | |
"const ${1:name} = ${2:value}" | |
], | |
"description": "const variable assignment" | |
}, | |
"if statement": { | |
"prefix": "iff", | |
"body": [ | |
"if (${1:condition}) {", | |
" ${0}", | |
"}" | |
], | |
"description": "if statement" | |
}, | |
"if-else statement": { | |
"prefix": "ife", | |
"body": [ | |
"if (${1:condition}) {", | |
" ${2}", | |
"} else {", | |
" ${3}", | |
"}" | |
], | |
"description": "if-else statement" | |
}, | |
"else-if statement": { | |
"prefix": "ei", | |
"body": [ | |
"else if (${1:condition}) {", | |
" ${0}", | |
"}" | |
], | |
"description": "else-if statement" | |
}, | |
"return": { | |
"prefix": "ret", | |
"body": [ | |
"return ${0}" | |
], | |
"description": "return" | |
}, | |
"return true": { | |
"prefix": "rt", | |
"body": [ | |
"return true;", | |
"" | |
], | |
"description": "return true" | |
}, | |
"return false": { | |
"prefix": "rf", | |
"body": [ | |
"return false;", | |
"" | |
], | |
"description": "return false" | |
}, | |
"map": { | |
"prefix": "map", | |
"body": [ | |
"${1:iterable}.map(${2:iterator});" | |
], | |
"description": "map method" | |
}, | |
"reduce method": { | |
"prefix": "red", | |
"body": [ | |
"${1:iterable}.reduce((${2:previous}, ${3:current}) => {", | |
" ${0}", | |
"}${4:, initial});" | |
], | |
"description": "reduce method" | |
}, | |
"filter method": { | |
"prefix": "filt", | |
"body": [ | |
"${1:iterable}.filter(${2:iterator});" | |
], | |
"description": "filter method" | |
}, | |
"find method": { | |
"prefix": "find", | |
"body": [ | |
"${1:iterable}.find(${2:iterator});", | |
"" | |
], | |
"description": "find method" | |
}, | |
"JSON array": { | |
"prefix": "jsa", | |
"body": [ | |
"\"${1:key}\": [\"${2:values}\"]" | |
], | |
"description": "JSON array" | |
}, | |
"for loop": { | |
"prefix": "fl", | |
"body": [ | |
"for (let ${1:i} = 0; ${1:i} < ${2:iterable}${3:.length}; ${1:i}++) {", | |
" ${4:code}", | |
"}" | |
], | |
"description": "for loop" | |
}, | |
"Object key/value pair": { | |
"prefix": "kv", | |
"body": [ | |
"${1:key}: ${2:'value'}" | |
], | |
"description": "Object key/value pair" | |
}, | |
"debugger": { | |
"prefix": "de", | |
"body": [ | |
"debugger;$1" | |
], | |
"description": "Code snippet for 'debugger'" | |
}, | |
"getElementById": { | |
"prefix": "gi", | |
"body": [ | |
"${1:document}.getElementById('${2:id}');" | |
], | |
"description": "Code snippet for \"getElementById\"" | |
}, | |
"getElementsByClassName": { | |
"prefix": "gc", | |
"body": [ | |
"${1:document}.getElementsByClassName('${2:class}');" | |
], | |
"description": "Code snippet for \"getElementsByClassName\"" | |
}, | |
"getElementsByTagName": { | |
"prefix": "gt", | |
"body": [ | |
"${1:document}.getElementsByTagName('${2:tag}');" | |
], | |
"description": "Code snippet for \"getElementsByTagName\"" | |
}, | |
"getAttribute": { | |
"prefix": "ga", | |
"body": [ | |
"${1:document}.getAttribute('${2:attr}');" | |
], | |
"description": "Code snippet for \"getAttribute\"" | |
}, | |
"setAttribute": { | |
"prefix": "sa", | |
"body": [ | |
"${1:document}.setAttribute('${2:attr}', ${3:value});" | |
], | |
"description": "Code snippet for \"setAttribute\"" | |
}, | |
"removeAttribute": { | |
"prefix": "ra", | |
"body": [ | |
"${1:document}.removeAttribute('${2:attr}');" | |
], | |
"description": "Code snippet for \"removeAttribute\"" | |
}, | |
"innerHTML": { | |
"prefix": "ih", | |
"body": [ | |
"${1:document}.innerHTML = '${2:elem}';" | |
], | |
"description": "Code snippet for \"innerHTML\"" | |
}, | |
"textContent": { | |
"prefix": "tc", | |
"body": [ | |
"${1:document}.textContent = '${2:content}';" | |
], | |
"description": "Code snippet for \"textContent\"" | |
}, | |
"querySelector": { | |
"prefix": "qs", | |
"body": [ | |
"${1:document}.querySelector('${2:selector}');" | |
], | |
"description": "Code snippet for \"querySelector\"" | |
}, | |
"querySelectorAll": { | |
"prefix": "qsa", | |
"body": [ | |
"${1:document}.querySelectorAll('${2:selector}');" | |
], | |
"description": "Code snippet for \"querySelectorAll\"" | |
}, | |
"alert": { | |
"prefix": "al", | |
"body": [ | |
"alert('${1:msg}');" | |
], | |
"description": "Code snippet for 'alert'" | |
}, | |
"confirm": { | |
"prefix": "cof", | |
"body": [ | |
"confirm('${1:msg}');" | |
], | |
"description": "Code snippet for 'confirm'" | |
}, | |
"prompt": { | |
"prefix": "pm", | |
"body": [ | |
"prompt('${1:msg}');" | |
], | |
"description": "Code snippet for 'prompt'" | |
}, | |
"function": { | |
"prefix": "fn", | |
"body": [ | |
"function ${1:methodName} (${2:arguments}) {", | |
"\t${3:// body}", | |
"}" | |
], | |
"description": "Code snippet for function" | |
}, | |
"ES5 anonymous function": { | |
"prefix": "afn", | |
"body": [ | |
"function(${1:arguments}) {", | |
"\t${2:// body}", | |
"}" | |
], | |
"description": "Code snippet for ES5 anonymous function" | |
}, | |
"Ternary Operator": { | |
"prefix": "ter", | |
"body": [ | |
"${1} ? ${2} : ${3}" | |
], | |
"description": "Code snippet for ternary operator" | |
}, | |
"Object Literal": { | |
"prefix": "ol", | |
"body": [ | |
"{ ${1}: ${2}, }" | |
], | |
"description": "Code snippet for object literal" | |
}, | |
"Async arrow function": { | |
"prefix": "asaf", | |
"body": [ | |
"async (${1}) => {${2}}" | |
], | |
"description": "Code snippet for Async arrow function" | |
}, | |
"Try/Catch": { | |
"prefix": "tce", | |
"body": [ | |
"try {", | |
"\t${1}", | |
"} catch (error) {", | |
"\t${2}", | |
" } ", | |
], | |
"description": "Code snippet for Try Catch error" | |
}, | |
"Multi-comment": { | |
"prefix": "mcm", | |
"body": [ | |
"/**", | |
" * ${1}", | |
" */ ", | |
], | |
"description": "Code snippet for Try Catch error" | |
}, | |
"Simple export": { | |
"prefix": "ex", | |
"body": [ | |
"export \t", | |
], | |
"description": "Code snippet for simple export" | |
}, | |
// /////////////////// REACT SNIPPETS | |
// IMPORT METHODS | |
"Import Prop-types": { | |
"prefix": "imrp", | |
"body": [ | |
"import React from 'react'", | |
"import PropTypes from 'prop-types'", | |
], | |
"description": "Import React and proptypes" | |
}, | |
"Import React": { | |
"prefix": "imr", | |
"body": [ | |
"import React from 'react';" | |
], | |
"description": "Import React" | |
}, | |
"Import React, { Component }": { | |
"prefix": "imrc", | |
"body": [ | |
"import React, { Component } from 'react';" | |
], | |
"description": "Import React, { Component }" | |
}, | |
"Import PropTypes": { | |
"prefix": "impt", | |
"body": [ | |
"import PropTypes from 'prop-types';" | |
], | |
"description": "Import PropTypes" | |
}, | |
"import": { | |
"prefix": "imp", | |
"body": "import ${2:moduleName} from '${1:module}'$0" | |
}, | |
"importNoModuleName": { | |
"prefix": "imn", | |
"body": "import '${1:module}'$0" | |
}, | |
"importDestructing": { | |
"prefix": "imd", | |
"body": "import { $2 } from '${1:module}'$0" | |
}, | |
"importEverything": { | |
"prefix": "ime", | |
"body": "import * as ${2:alias} from '${1:module}'$0" | |
}, | |
"importAs": { | |
"prefix": "ima", | |
"body": "import { ${2:originalName} as ${3:alias} } from '${1:module}'$0" | |
}, | |
// EXPORT METHODS | |
"exportDefault": { | |
"prefix": "exp", | |
"body": "export default $1$0" | |
}, | |
"exportDestructing": { | |
"prefix": "exd", | |
"body": "export { $2 } from '${1:module}'$0" | |
}, | |
"exportAs": { | |
"prefix": "exa", | |
"body": "export { ${2:originalName} as ${3:alias} } from '${1:module}'$0" | |
}, | |
"exportNamedFunction": { | |
"prefix": "exnf", | |
"body": [ | |
"export const ${1:functionName} = (${2:params}) => {", | |
" $0", | |
"}", | |
"" | |
], | |
"description": "Export named function in ES7 syntax" | |
}, | |
"exportDefaultFunction": { | |
"prefix": "exdf", | |
"body": [ | |
"export default (${1:params}) => {", | |
" $0", | |
"}", | |
"" | |
], | |
"description": "Export default function in ES7 syntax" | |
}, | |
// BASE ES6 METHODS | |
"forEach": { | |
"prefix": "fre", | |
"body": [ | |
"${1:array}.forEach(${2:currentItem} => {", | |
" ${0}", | |
"})", | |
"" | |
], | |
"description": "Creates a forEach statement in ES7 syntax" | |
}, | |
"forOf": { | |
"prefix": "fof", | |
"body": [ | |
"for(let ${1:item} of ${2:object}) {", | |
" ${0}", | |
"}", | |
"" | |
], | |
"description": "Iterating over property names of iterable objects" | |
}, | |
"forIn": { | |
"prefix": "fin", | |
"body": [ | |
"for(let ${1:item} in ${2:object}) {", | |
" ${0}", | |
"}", | |
"" | |
], | |
"description": "Iterating over property values of iterable objects" | |
}, | |
"anonymousFunction": { | |
"prefix": "anfn", | |
"body": [ | |
"(${1:params}) => {", | |
" ${2}", | |
"}", | |
"" | |
], | |
"description": "Creates an anonymous function in ES7 syntax" | |
}, | |
"namedFunction": { | |
"prefix": "nfn", | |
"body": [ | |
"const ${1:name} = (${2:params}) => {", | |
" ${3}", | |
"}", | |
"" | |
], | |
"description": "Creates a named function in ES7 syntax" | |
}, | |
"destructingObject": { | |
"prefix": "dob", | |
"body": "const {${1:propertyName}} = ${2:objectToDestruct}", | |
"description": "Creates and assigns a local variable using object destructing" | |
}, | |
"destructingArray": { | |
"prefix": "dar", | |
"body": "const [${1:propertyName}] = ${2:arrayToDestruct}", | |
"description": "Creates and assigns a local variable using array destructing" | |
}, | |
"setInterval": { | |
"prefix": "sti", | |
"body": [ | |
"setInterval(() => {", | |
" ${2}", | |
"}, ${0:intervalInms})", | |
"" | |
], | |
"description": "Executes the given function at specified intervals in ES7 syntax" | |
}, | |
"setTimeOut": { | |
"prefix": "sto", | |
"body": [ | |
"setTimeout(() => {", | |
" ${2}", | |
"}, ${1:delayInms})", | |
"" | |
], | |
"description": "Executes the given function after the specified delay in ES7 syntax" | |
}, | |
// COMPONENT STATE AND PROPS METHODS | |
"destructProps": { | |
"prefix": "dcp", | |
"body": [ | |
"const { $1 } = props" | |
], | |
"description": "Creates and assigns a local variable using props destructing" | |
}, | |
"destructState": { | |
"prefix": "dcs", | |
"body": [ | |
"const { $1 } = this.state" | |
], | |
"description": "Creates and assigns a local variable using state destructing" | |
}, | |
"emptyState": { | |
"prefix": "est", | |
"body": [ | |
"state = {", | |
" $1", | |
"}", | |
"" | |
], | |
"description": "Creates empty state object. To be used in a constructor." | |
}, | |
"componentSetStateObject": { | |
"prefix": "sst", | |
"body": "this.setState({$0})", | |
"description": "Performs a shallow merge of nextState into current state" | |
}, | |
"staticProptypes": { | |
"prefix": "sspt", | |
"body": [ | |
"static propTypes = {", | |
"\t${1}", | |
"}", | |
], | |
"description": "Performs a shallow merge of nextState into current state" | |
}, | |
"statelessProptypes": { | |
"prefix": "spt", | |
"body": [ | |
"${TM_FILENAME_BASE}.propTypes = {", | |
"\t${1}", | |
"}", | |
], | |
"description": "set proptypes in stateless component" | |
}, | |
"defaultProps": { | |
"prefix": "sdp", | |
"body": [ | |
"${TM_FILENAME_BASE}.defaultProps = {", | |
"\t${1}", | |
"},", | |
], | |
"description": "Creates empty defaultProps declaration" | |
}, | |
"ReactDOM render": { | |
"prefix": "rdr", | |
"body": [ | |
"ReactDOM.render(${1:Component}, document.getElementById('app'))", | |
], | |
"description": "Code snippet for ReactDOM.render method" | |
}, | |
"method": { | |
"prefix": "met", | |
"body": [ | |
"${1:methodName} = (${2:params}) => {", | |
" ${0}", | |
"}", | |
"" | |
], | |
"description": "Creates a method inside a class in ES7 syntax" | |
}, | |
// REACT COMPONENT TYPES | |
"reactClassCompomentPropTypes": { | |
"prefix": "rccp", | |
"body": [ | |
"import React from 'react'", | |
"import PropTypes from 'prop-types'", | |
"", | |
"class ${1:${TM_FILENAME_BASE}} extends React.Component {", | |
" static propTypes = {", | |
" ", | |
" }", | |
"", | |
" render() {", | |
" return (", | |
" <div>", | |
" $0", | |
" </div>", | |
" )", | |
" }", | |
"}", | |
"", | |
"export default ${1:${TM_FILENAME_BASE}}" | |
], | |
"description": "Creates a React component class with PropTypes and ES7 module system" | |
}, | |
"React-Proptypes SFC": { | |
"prefix": "rscp", | |
"body": [ | |
"import React from 'react';", | |
"import PropTypes from 'prop-types'", | |
"\nconst ${1:${TM_FILENAME_BASE}} = (${2:props}) => (", | |
"\t$0", | |
")", | |
"\n\n${1:${TM_FILENAME_BASE}}.propTypes = {\n\t$0\n};\n\n", | |
"export default ${1:${TM_FILENAME_BASE}};" | |
], | |
"description": "Stateless Function Component" | |
}, | |
"Stateless Function Component": { | |
"prefix": "rsfc", | |
"body": [ | |
"", | |
"const ${1:${TM_FILENAME_BASE}} = () => (", | |
" <div>", | |
" $0", | |
" </div>", | |
")", | |
"", | |
"export default ${1:${TM_FILENAME_BASE}}", | |
"" | |
], | |
"description": "Stateless Function Component" | |
}, | |
"reactJustClassComponent": { | |
"prefix": "rcjc", | |
"body": [ | |
"", | |
"class ${1:${TM_FILENAME_BASE}} extends React.Component {", | |
" render() {", | |
" return (", | |
" <div>", | |
" $0", | |
" </div>", | |
" )", | |
" }", | |
"}", | |
"", | |
"export default ${1:${TM_FILENAME_BASE}}" | |
], | |
"description": "Creates a React component class with ES6 module system" | |
}, | |
// PROPTYPES | |
"propTypes": { | |
"prefix": "rpt", | |
"body": "$1.propTypes = {\n\t$2\n};", | |
"description": "Creates empty propTypes declaration" | |
}, | |
"propTypeArray": { | |
"prefix": "pta", | |
"body": "PropTypes.array,", | |
"description": "Array prop type" | |
}, | |
"propTypeArrayRequired": { | |
"prefix": "ptar", | |
"body": "PropTypes.array.isRequired,", | |
"description": "Array prop type required" | |
}, | |
"propTypeBool": { | |
"prefix": "ptb", | |
"body": "PropTypes.bool,", | |
"description": "Bool prop type" | |
}, | |
"propTypeBoolRequired": { | |
"prefix": "ptbr", | |
"body": "PropTypes.bool.isRequired,", | |
"description": "Bool prop type required" | |
}, | |
"propTypeFunc": { | |
"prefix": "ptf", | |
"body": "PropTypes.func,", | |
"description": "Func prop type" | |
}, | |
"propTypeFuncRequired": { | |
"prefix": "ptfr", | |
"body": "PropTypes.func.isRequired,", | |
"description": "Func prop type required" | |
}, | |
"propTypeNumber": { | |
"prefix": "ptn", | |
"body": "PropTypes.number,", | |
"description": "Number prop type" | |
}, | |
"propTypeNumberRequired": { | |
"prefix": "ptnr", | |
"body": "PropTypes.number.isRequired,", | |
"description": "Number prop type required" | |
}, | |
"propTypeObject": { | |
"prefix": "pto", | |
"body": "PropTypes.object,", | |
"description": "Object prop type" | |
}, | |
"propTypeObjectRequired": { | |
"prefix": "ptor", | |
"body": "PropTypes.object.isRequired,", | |
"description": "Object prop type required" | |
}, | |
"propTypeString": { | |
"prefix": "pts", | |
"body": "PropTypes.string,", | |
"description": "String prop type" | |
}, | |
"propTypeStringRequired": { | |
"prefix": "ptsr", | |
"body": "PropTypes.string.isRequired,", | |
"description": "String prop type required" | |
}, | |
"propTypeNode": { | |
"prefix": "ptnd", | |
"body": "PropTypes.node,", | |
"description": "Anything that can be rendered: numbers, strings, elements or an array" | |
}, | |
"propTypeNodeRequired": { | |
"prefix": "ptndr", | |
"body": "PropTypes.node.isRequired,", | |
"description": "Anything that can be rendered: numbers, strings, elements or an array required" | |
}, | |
"propTypeElement": { | |
"prefix": "ptel", | |
"body": "PropTypes.element,", | |
"description": "React element prop type" | |
}, | |
"propTypeElementRequired": { | |
"prefix": "ptelr", | |
"body": "PropTypes.element.isRequired,", | |
"description": "React element prop type required" | |
}, | |
"propTypeInstanceOf": { | |
"prefix": "pti", | |
"body": "PropTypes.instanceOf($0),", | |
"description": "Is an instance of a class prop type" | |
}, | |
"propTypeInstanceOfRequired": { | |
"prefix": "ptir", | |
"body": "PropTypes.instanceOf($0).isRequired,", | |
"description": "Is an instance of a class prop type required" | |
}, | |
"propTypeEnum": { | |
"prefix": "pte", | |
"body": "PropTypes.oneOf(['$0']),", | |
"description": "Prop type limited to specific values by treating it as an enum" | |
}, | |
"propTypeEnumRequired": { | |
"prefix": "pter", | |
"body": "PropTypes.oneOf(['$0']).isRequired,", | |
"description": "Prop type limited to specific values by treating it as an enum required" | |
}, | |
"propTypeOneOfType": { | |
"prefix": "ptet", | |
"body": "PropTypes.oneOfType([\n\t$0\n]),", | |
"description": "An object that could be one of many types" | |
}, | |
"propTypeOneOfTypeRequired": { | |
"prefix": "ptetr", | |
"body": "PropTypes.oneOfType([\n\t$0\n]).isRequired,", | |
"description": "An object that could be one of many types required" | |
}, | |
"propTypeArrayOf": { | |
"prefix": "ptao", | |
"body": "PropTypes.arrayOf($0),", | |
"description": "An array of a certain type" | |
}, | |
"propTypeArrayOfRequired": { | |
"prefix": "ptaor", | |
"body": "PropTypes.arrayOf($0).isRequired,", | |
"description": "An array of a certain type required" | |
}, | |
"propTypeObjectOf": { | |
"prefix": "ptoo", | |
"body": "PropTypes.objectOf($0),", | |
"description": "An object with property values of a certain type" | |
}, | |
"propTypeObjectOfRequired": { | |
"prefix": "ptoor", | |
"body": "PropTypes.objectOf($0).isRequired,", | |
"description": "An object with property values of a certain type required" | |
}, | |
"propTypeObjectOfShape": { | |
"prefix": "ptoos", | |
"body": "PropTypes.objectOf(PropTypes.shape($0)),", | |
"description": "An object whose keys are known ahead of time" | |
}, | |
"propTypeObjectOfShapeRequired": { | |
"prefix": "ptoosr", | |
"body": "PropTypes.objectOf(PropTypes.shape($0)).isRequired,", | |
"description": "An object whose keys are known ahead of time required" | |
}, | |
"propTypeShape": { | |
"prefix": "ptsh", | |
"body": "PropTypes.shape({\n\t$0\n}),", | |
"description": "An object taking on a particular shape" | |
}, | |
"propTypeShapeRequired": { | |
"prefix": "ptshr", | |
"body": "PropTypes.shape({\n\t$0\n}).isRequired,", | |
"description": "An object taking on a particular shape required" | |
}, | |
// MORE CUSTOMS | |
"consoleLog": { | |
"prefix": "clg", | |
"body": "console.log(${1:object})", | |
"description": "Displays a message in the console" | |
}, | |
"componentWillMount": { | |
"prefix": "cwm", | |
"body": [ | |
"componentWillMount = () => {", | |
" $0", | |
"}", | |
"" | |
], | |
"description": "DEPRECATED!!!. Invoked once, both on the client and server, immediately before the initial rendering occurs" | |
}, | |
"componentDidMount": { | |
"prefix": "cdm", | |
"body": [ | |
"componentDidMount = () => {", | |
" $0", | |
"}", | |
"" | |
], | |
"description": "Invoked once, only on the client (not on the server), immediately after the initial rendering occurs." | |
}, | |
"componentWillReceiveProps": { | |
"prefix": "cwr", | |
"body": [ | |
"componentWillReceiveProps = (nextProps) => {", | |
" $0", | |
"}", | |
"" | |
], | |
"description": "DEPRECATED!!!. Invoked when a component is receiving new props. This method is not called for the initial render." | |
}, | |
"shouldComponentUpdate": { | |
"prefix": "scu", | |
"body": [ | |
"shouldComponentUpdate = (nextProps, nextState) => {", | |
" $0", | |
"}", | |
"" | |
], | |
"description": "Invoked before rendering when new props or state are being received. " | |
}, | |
"componentWillUpdate": { | |
"prefix": "cwup", | |
"body": [ | |
"componentWillUpdate = (nextProps, nextState) => {", | |
" $0", | |
"}", | |
"" | |
], | |
"description": "DEPRECATED!!!. Invoked immediately before rendering when new props or state are being received." | |
}, | |
"componentDidUpdate": { | |
"prefix": "cdup", | |
"body": [ | |
"componentDidUpdate = (prevProps, prevState) => {", | |
" $0", | |
"}", | |
"" | |
], | |
"description": "Invoked immediately after the component's updates are flushed to the DOM." | |
}, | |
"componentWillUnmount": { | |
"prefix": "cwun", | |
"body": [ | |
"componentWillUnmount = () => {", | |
" $0", | |
"}", | |
"" | |
], | |
"description": "Invoked immediately before a component is unmounted from the DOM." | |
}, | |
"componentSetStateFunc": { | |
"prefix": "ssf", | |
"body": "this.setState((state, props) => { return { $0 }});\n", | |
"description": "Performs a shallow merge of nextState into current state" | |
}, | |
"higherOrderComponent": { | |
"prefix": "hoc", | |
"body": [ | |
"import React from 'react'", | |
"import PropTypes from 'prop-types'", | |
"", | |
"export default (WrappedComponent) => {", | |
" const hocComponent = ({ ...props }) => <WrappedComponent {...props} />", | |
"", | |
" hocComponent.propTypes = {", | |
" }", | |
"", | |
" return hocComponent", | |
"}", | |
"" | |
], | |
"description": "HigherOrderComponent" | |
}, | |
"renderFunction": { | |
"prefix": "ren", | |
"body": [ | |
"render() {", | |
" return (", | |
" <div>", | |
" $0", | |
" </div>", | |
" )", | |
" }", | |
], | |
"description": "Simple React render function" | |
}, | |
"axios call": { | |
"prefix": "axs", | |
"body": [ | |
"axios.get($1).then(res => {$2}).catch(error => {})", | |
], | |
"description": "Simple React render function" | |
}, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"version":"7.19.0","status":2,"welcomeShown":true} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment