Last active
January 25, 2017 00:11
-
-
Save etoxin/8f02d7af1a1f7403935c07f5feb45f9c to your computer and use it in GitHub Desktop.
Visual Studio Code User Snippets and Other Settings
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
| { | |
| "Print to console": { | |
| "prefix": "l", | |
| "body": [ | |
| "console.log('$1');", | |
| "$2" | |
| ], | |
| "description": "Log output to console" | |
| }, | |
| "Simple function":{ | |
| "prefix": "fun", | |
| "body": [ | |
| "function ${1:name}(${2:param}){\n\t $3\n}" | |
| ], | |
| "description": "simple function" | |
| }, | |
| "IIFE": { | |
| "prefix": "iife", | |
| "body": [ | |
| "(function() {", | |
| " $1", | |
| "}());" | |
| ], | |
| "description": "Immediately-invoked function expression" | |
| }, | |
| "Iterate Array": { | |
| "prefix": "itar", | |
| "body": [ | |
| "for (var i = 0; i < ${1:array}.length; i++) {", | |
| " var item = ${1:array}[i];", | |
| " $3", | |
| "}" | |
| ], | |
| "description": "Iterate elements of array" | |
| }, | |
| "Iterate (for..in)": { | |
| "prefix": "itob", | |
| "body": [ | |
| "for (var ${1:prop} in ${2:object}) {", | |
| " console.log('${2:object}.' + ${1:prop}, '=', ${2:object}[${1:prop}]);", | |
| " $3", | |
| "}" | |
| ], | |
| "description": "Iterate (for..in)" | |
| }, | |
| "qsa": { | |
| "prefix": "qsa", | |
| "body": [ | |
| "var ${1:elem} = document.querySelectorAll('${2:targetQuery}');" | |
| ], | |
| "description": "qsa" | |
| }, | |
| } |
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": "ctrl+d", "command": "editor.action.copyLinesDownAction", | |
| "when": "editorTextFocus && !editorReadonly" }, | |
| { "key": "ctrl+shift+down", "command": "editor.action.moveLinesDownAction", | |
| "when": "editorTextFocus && !editorReadonly" }, | |
| { "key": "ctrl+shift+up", "command": "editor.action.moveLinesUpAction", | |
| "when": "editorTextFocus && !editorReadonly" } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment