Last active
June 30, 2019 03:12
-
-
Save Gyumeijie/29aed9238900315f1a22bbf09d14b818 to your computer and use it in GitHub Desktop.
snippets
This file contains 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
function addQueryParameters (url, parameters) { | |
const separator = /\?/.test(url) ? '&' : '?' | |
const names = Object.keys(parameters) | |
if (names.length === 0) { | |
return url | |
} | |
return url + separator + names | |
.map(name => { | |
if (name === 'q') { | |
return 'q=' + parameters.q.split('+') | |
.map(encodeURIComponent) | |
.join('+') | |
} | |
return `${name}=${encodeURIComponent(parameters[name])}` | |
}) | |
.join('&') | |
} |
This file contains 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
curl --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" -b "_xsrf=cedc7ecbc2ce4898b1747e36924de6ea; anon_u=cHN1X18wNDhmY2I4Yi00N2UyLTQzODUtOGU4ZC02ODcyOWNiYjlmY2Y=|1539888606|599964150c2bda927c929d76cdaa3863cddcc498" -d 'url=https://github.com/Gyumeij2i33ejjjd' -H 'x-xsrftoken:cedc7ecbc2ce4898b1747e36924de6ea' --referer "https://bitly.com/" https://bitly.com/data/shorten |
This file contains 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
var formData = new FormData(); | |
formData.append("url", "https://github.com/Gyumeijie"); | |
var request = new XMLHttpRequest(); | |
request.open("POST", " https://git.io/create"); | |
request.send(formData); | |
This file contains 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
// Create or update a file | |
/** | |
* Format: | |
* PUT /repos/:owner/:repo/contents/:path | |
* Parameters: | |
* message, content .... | |
* Example: | |
* curl -i -X PUT -u 'Tyumeijie:YMJ@338279@github' https://api.github.com/repos/Tyumeijie/picture/contents/empty -d '{"message": "Initial Commit","content": "bXkgbmV3IGZpbGUgY29udGVudHM="}' | |
*/ | |
// 3ab2cb96ea47f734ca6d21a57be663de0c3424d2 |
This file contains 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
// Overwrite key bindings by placing them into your key bindings file. | |
[ | |
{ "key": "escape escape", "command": "workbench.action.exitZenMode", | |
"when": "inZenMode" }, | |
{ "key": "shift+escape", "command": "closeReferenceSearchEditor", | |
"when": "inReferenceSearchEditor && !config.editor.stablePeek" }, | |
{ "key": "escape", "command": "closeReferenceSearchEditor", | |
"when": "inReferenceSearchEditor && !config.editor.stablePeek" }, | |
{ "key": "shift+escape", "command": "cancelSelection", | |
"when": "editorHasSelection && textInputFocus" }, | |
{ "key": "escape", "command": "cancelSelection", | |
"when": "editorHasSelection && textInputFocus" }, | |
{ "key": "ctrl+end", "command": "cursorBottom", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+shift+end", "command": "cursorBottomSelect", | |
"when": "textInputFocus" }, | |
{ "key": "down", "command": "cursorDown", | |
"when": "textInputFocus" }, | |
{ "key": "shift+down", "command": "cursorDownSelect", | |
"when": "textInputFocus" }, | |
{ "key": "end", "command": "cursorEnd", | |
"when": "textInputFocus" }, | |
{ "key": "shift+end", "command": "cursorEndSelect", | |
"when": "textInputFocus" }, | |
{ "key": "home", "command": "cursorHome", | |
"when": "textInputFocus" }, | |
{ "key": "shift+home", "command": "cursorHomeSelect", | |
"when": "textInputFocus" }, | |
{ "key": "left", "command": "cursorLeft", | |
"when": "textInputFocus" }, | |
{ "key": "shift+left", "command": "cursorLeftSelect", | |
"when": "textInputFocus" }, | |
{ "key": "pagedown", "command": "cursorPageDown", | |
"when": "textInputFocus" }, | |
{ "key": "shift+pagedown", "command": "cursorPageDownSelect", | |
"when": "textInputFocus" }, | |
{ "key": "pageup", "command": "cursorPageUp", | |
"when": "textInputFocus" }, | |
{ "key": "shift+pageup", "command": "cursorPageUpSelect", | |
"when": "textInputFocus" }, | |
{ "key": "right", "command": "cursorRight", | |
"when": "textInputFocus" }, | |
{ "key": "shift+right", "command": "cursorRightSelect", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+home", "command": "cursorTop", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+shift+home", "command": "cursorTopSelect", | |
"when": "textInputFocus" }, | |
{ "key": "up", "command": "cursorUp", | |
"when": "textInputFocus" }, | |
{ "key": "shift+up", "command": "cursorUpSelect", | |
"when": "textInputFocus" }, | |
{ "key": "shift+backspace", "command": "deleteLeft", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "backspace", "command": "deleteLeft", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "delete", "command": "deleteRight", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "ctrl+a", "command": "editor.action.selectAll", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+i", "command": "expandLineSelection", | |
"when": "textInputFocus" }, | |
{ "key": "shift+tab", "command": "outdent", | |
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus" }, | |
{ "key": "ctrl+shift+z", "command": "redo", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "ctrl+y", "command": "redo", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "ctrl+down", "command": "scrollLineDown", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+up", "command": "scrollLineUp", | |
"when": "textInputFocus" }, | |
{ "key": "alt+pagedown", "command": "scrollPageDown", | |
"when": "textInputFocus" }, | |
{ "key": "alt+pageup", "command": "scrollPageUp", | |
"when": "textInputFocus" }, | |
{ "key": "tab", "command": "tab", | |
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus" }, | |
{ "key": "ctrl+z", "command": "undo", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "shift+escape", "command": "removeSecondaryCursors", | |
"when": "editorHasMultipleSelections && textInputFocus" }, | |
{ "key": "escape", "command": "removeSecondaryCursors", | |
"when": "editorHasMultipleSelections && textInputFocus" }, | |
{ "key": "right", "command": "repl.action.acceptSuggestion", | |
"when": "inDebugRepl && suggestWidgetVisible && textInputFocus" }, | |
{ "key": "ctrl+f", "command": "actions.find" }, | |
{ "key": "enter", "command": "breakpointWidget.action.acceptInput", | |
"when": "breakpointWidgetVisible && inBreakpointWidget" }, | |
{ "key": "shift+escape", "command": "closeBreakpointWidget", | |
"when": "breakpointWidgetVisible && textInputFocus" }, | |
{ "key": "escape", "command": "closeBreakpointWidget", | |
"when": "breakpointWidgetVisible && textInputFocus" }, | |
{ "key": "shift+escape", "command": "closeReviewPanel", | |
"when": "reviewPanelVisible" }, | |
{ "key": "escape", "command": "closeReviewPanel", | |
"when": "reviewPanelVisible" }, | |
{ "key": "ctrl+u", "command": "cursorUndo", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+right", "command": "cursorWordEndRight", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+shift+right", "command": "cursorWordEndRightSelect", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+left", "command": "cursorWordStartLeft", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+shift+left", "command": "cursorWordStartLeftSelect", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+backspace", "command": "deleteWordLeft", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "ctrl+delete", "command": "deleteWordRight", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "ctrl+k ctrl+c", "command": "editor.action.addCommentLine", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+d", "command": "editor.action.addSelectionToNextFindMatch", | |
"when": "editorFocus" }, | |
{ "key": "ctrl+shift+a", "command": "editor.action.blockComment", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+f2", "command": "editor.action.changeAll", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+c", "command": "editor.action.clipboardCopyAction", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+x", "command": "editor.action.clipboardCutAction", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "ctrl+v", "command": "editor.action.clipboardPasteAction", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "ctrl+/", "command": "editor.action.commentLine", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+alt+down", "command": "editor.action.copyLinesDownAction", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+alt+up", "command": "editor.action.copyLinesUpAction", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+k ctrl+k", "command": "editor.action.defineKeybinding", | |
"when": "editorTextFocus && !editorReadonly && editorLangId == 'jsonc'" }, | |
{ "key": "ctrl+shift+k", "command": "editor.action.deleteLines", | |
"when": "textInputFocus && !editorReadonly" }, | |
{ "key": "f7", "command": "editor.action.diffReview.next", | |
"when": "isInDiffEditor" }, | |
{ "key": "shift+f7", "command": "editor.action.diffReview.prev", | |
"when": "isInDiffEditor" }, | |
{ "key": "alt+f3", "command": "editor.action.dirtydiff.next", | |
"when": "editorTextFocus" }, | |
{ "key": "shift+alt+f3", "command": "editor.action.dirtydiff.previous", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+f", "command": "editor.action.extensioneditor.showfind", | |
"when": "extensionEditorWebviewFocus" }, | |
{ "key": "ctrl+shift+i", "command": "editor.action.formatDocument", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+k ctrl+f", "command": "editor.action.formatSelection", | |
"when": "editorHasSelection && editorTextFocus && !editorReadonly" }, | |
{ "key": "f12", "command": "editor.action.goToDeclaration", | |
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" }, | |
{ "key": "ctrl+f12", "command": "editor.action.goToImplementation", | |
"when": "editorHasImplementationProvider && editorTextFocus && !isInEmbeddedEditor" }, | |
{ "key": "ctrl+shift+.", "command": "editor.action.inPlaceReplace.down", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+[IntlBackslash]", "command": "editor.action.inPlaceReplace.down", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+,", "command": "editor.action.inPlaceReplace.up", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+[IntlBackslash]", "command": "editor.action.inPlaceReplace.up", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+]", "command": "editor.action.indentLines", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+up", "command": "editor.action.insertCursorAbove", | |
"when": "editorTextFocus" }, | |
{ "key": "shift+alt+up", "command": "editor.action.insertCursorAbove", | |
"when": "editorTextFocus" }, | |
{ "key": "shift+alt+i", "command": "editor.action.insertCursorAtEndOfEachLineSelected", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+shift+down", "command": "editor.action.insertCursorBelow", | |
"when": "editorTextFocus" }, | |
{ "key": "shift+alt+down", "command": "editor.action.insertCursorBelow", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+enter", "command": "editor.action.insertLineAfter", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+enter", "command": "editor.action.insertLineBefore", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+\\", "command": "editor.action.jumpToBracket", | |
"when": "editorTextFocus" }, | |
{ "key": "f8", "command": "editor.action.marker.nextInFiles", | |
"when": "editorFocus && !editorReadonly" }, | |
{ "key": "shift+f8", "command": "editor.action.marker.prevInFiles", | |
"when": "editorFocus && !editorReadonly" }, | |
{ "key": "alt+down", "command": "editor.action.moveLinesDownAction", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "alt+up", "command": "editor.action.moveLinesUpAction", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+k ctrl+d", "command": "editor.action.moveSelectionToNextFindMatch", | |
"when": "editorFocus" }, | |
{ "key": "f3", "command": "editor.action.nextMatchFindAction", | |
"when": "editorFocus" }, | |
{ "key": "ctrl+f3", "command": "editor.action.nextSelectionMatchFindAction", | |
"when": "editorFocus" }, | |
{ "key": "ctrl+k f12", "command": "editor.action.openDeclarationToTheSide", | |
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" }, | |
{ "key": "shift+alt+o", "command": "editor.action.organizeImports", | |
"when": "editorTextFocus && !editorReadonly && supportedCodeAction =~ /(\\s|^)source\\.organizeImports\\b/" }, | |
{ "key": "ctrl+[", "command": "editor.action.outdentLines", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+f12", "command": "editor.action.peekImplementation", | |
"when": "editorHasImplementationProvider && editorTextFocus && !isInEmbeddedEditor" }, | |
{ "key": "ctrl+shift+f10", "command": "editor.action.previewDeclaration", | |
"when": "editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" }, | |
{ "key": "shift+f3", "command": "editor.action.previousMatchFindAction", | |
"when": "editorFocus" }, | |
{ "key": "ctrl+shift+f3", "command": "editor.action.previousSelectionMatchFindAction", | |
"when": "editorFocus" }, | |
{ "key": "ctrl+.", "command": "editor.action.quickFix", | |
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+r", "command": "editor.action.refactor", | |
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" }, | |
{ "key": "shift+f12", "command": "editor.action.referenceSearch.trigger", | |
"when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" }, | |
{ "key": "ctrl+k ctrl+u", "command": "editor.action.removeCommentLine", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "f2", "command": "editor.action.rename", | |
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly" }, | |
{ "key": "ctrl+shift+l", "command": "editor.action.selectHighlights", | |
"when": "editorFocus" }, | |
{ "key": "alt+f1", "command": "editor.action.showAccessibilityHelp", | |
"when": "editorFocus" }, | |
{ "key": "shift+f10", "command": "editor.action.showContextMenu", | |
"when": "textInputFocus" }, | |
{ "key": "ctrl+k ctrl+i", "command": "editor.action.showHover", | |
"when": "editorTextFocus" }, | |
{ "key": "shift+alt+right", "command": "editor.action.smartSelect.grow", | |
"when": "editorTextFocus" }, | |
{ "key": "shift+alt+left", "command": "editor.action.smartSelect.shrink", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+h", "command": "editor.action.startFindReplaceAction" }, | |
{ "key": "ctrl+m", "command": "editor.action.toggleTabFocusMode" }, | |
{ "key": "alt+z", "command": "editor.action.toggleWordWrap" }, | |
{ "key": "ctrl+shift+space", "command": "editor.action.triggerParameterHints", | |
"when": "editorHasSignatureHelpProvider && editorTextFocus" }, | |
{ "key": "ctrl+space", "command": "editor.action.triggerSuggest", | |
"when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly" }, | |
{ "key": "ctrl+k ctrl+x", "command": "editor.action.trimTrailingWhitespace", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "escape", "command": "editor.action.webvieweditor.hideFind", | |
"when": "webviewEditorFocus && webviewFindWidgetVisible" }, | |
{ "key": "ctrl+a", "command": "editor.action.webvieweditor.selectAll", | |
"when": "webviewEditorFocus" }, | |
{ "key": "ctrl+f", "command": "editor.action.webvieweditor.showFind", | |
"when": "webviewEditorFocus" }, | |
{ "key": "f7", "command": "editor.action.wordHighlight.next", | |
"when": "editorTextFocus && hasWordHighlights" }, | |
{ "key": "shift+f7", "command": "editor.action.wordHighlight.prev", | |
"when": "editorTextFocus && hasWordHighlights" }, | |
{ "key": "ctrl+k ctrl+i", "command": "editor.debug.action.showDebugHover", | |
"when": "editorTextFocus && inDebugMode" }, | |
{ "key": "f9", "command": "editor.debug.action.toggleBreakpoint", | |
"when": "editorTextFocus" }, | |
{ "key": "tab", "command": "editor.emmet.action.expandAbbreviation", | |
"when": "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorReadonly && !editorTabMovesFocus" }, | |
{ "key": "ctrl+shift+[", "command": "editor.fold", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+0", "command": "editor.foldAll", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+/", "command": "editor.foldAllBlockComments", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+8", "command": "editor.foldAllMarkerRegions", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+1", "command": "editor.foldLevel1", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+2", "command": "editor.foldLevel2", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+3", "command": "editor.foldLevel3", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+4", "command": "editor.foldLevel4", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+5", "command": "editor.foldLevel5", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+6", "command": "editor.foldLevel6", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+7", "command": "editor.foldLevel7", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+[", "command": "editor.foldRecursively", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+shift+]", "command": "editor.unfold", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+j", "command": "editor.unfoldAll", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+9", "command": "editor.unfoldAllMarkerRegions", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+k ctrl+]", "command": "editor.unfoldRecursively", | |
"when": "editorTextFocus" }, | |
{ "key": "tab", "command": "insertSnippet", | |
"when": "editorTextFocus && hasSnippetCompletions && !editorTabMovesFocus && !inSnippetMode" }, | |
{ "key": "ctrl+enter", "command": "openReferenceToSide", | |
"when": "referenceSearchTreeFocused && referenceSearchVisible" }, | |
{ "key": "enter", "command": "repl.action.acceptInput", | |
"when": "inDebugRepl && textInputFocus" }, | |
{ "key": "escape", "command": "settings.action.clearSearchResults", | |
"when": "inSettingsSearch" }, | |
{ "key": "ctrl+.", "command": "settings.action.editFocusedSetting", | |
"when": "inSettingsSearch" }, | |
{ "key": "enter", "command": "settings.action.focusNextSetting", | |
"when": "inSettingsSearch" }, | |
{ "key": "shift+enter", "command": "settings.action.focusPreviousSetting", | |
"when": "inSettingsSearch" }, | |
{ "key": "down", "command": "settings.action.focusSettingsFile", | |
"when": "inSettingsSearch" }, | |
{ "key": "ctrl+f", "command": "settings.action.search", | |
"when": "inSettingsEditor" }, | |
{ "key": "alt+f5", "command": "workbench.action.editor.nextChange", | |
"when": "editorTextFocus" }, | |
{ "key": "shift+alt+f5", "command": "workbench.action.editor.previousChange", | |
"when": "editorTextFocus" }, | |
{ "key": "shift+escape", "command": "closeFindWidget", | |
"when": "editorFocus && findWidgetVisible" }, | |
{ "key": "escape", "command": "closeFindWidget", | |
"when": "editorFocus && findWidgetVisible" }, | |
{ "key": "ctrl+alt+enter", "command": "editor.action.replaceAll", | |
"when": "editorFocus && findWidgetVisible" }, | |
{ "key": "ctrl+shift+1", "command": "editor.action.replaceOne", | |
"when": "editorFocus && findWidgetVisible" }, | |
{ "key": "alt+enter", "command": "editor.action.selectAllMatches", | |
"when": "editorFocus && findWidgetVisible" }, | |
{ "key": "alt+c", "command": "toggleFindCaseSensitive", | |
"when": "editorFocus" }, | |
{ "key": "alt+l", "command": "toggleFindInSelection", | |
"when": "editorFocus" }, | |
{ "key": "alt+r", "command": "toggleFindRegex", | |
"when": "editorFocus" }, | |
{ "key": "alt+w", "command": "toggleFindWholeWord", | |
"when": "editorFocus" }, | |
{ "key": "tab", "command": "jumpToNextSnippetPlaceholder", | |
"when": "editorTextFocus && hasNextTabstop && inSnippetMode" }, | |
{ "key": "shift+tab", "command": "jumpToPrevSnippetPlaceholder", | |
"when": "editorTextFocus && hasPrevTabstop && inSnippetMode" }, | |
{ "key": "escape", "command": "leaveEditorMessage", | |
"when": "messageVisible" }, | |
{ "key": "shift+escape", "command": "leaveSnippet", | |
"when": "editorTextFocus && inSnippetMode" }, | |
{ "key": "escape", "command": "leaveSnippet", | |
"when": "editorTextFocus && inSnippetMode" }, | |
{ "key": "shift+escape", "command": "closeDirtyDiff", | |
"when": "dirtyDiffVisible" }, | |
{ "key": "escape", "command": "closeDirtyDiff", | |
"when": "dirtyDiffVisible" }, | |
{ "key": "shift+escape", "command": "closeMarkersNavigation", | |
"when": "editorFocus && markersNavigationVisible" }, | |
{ "key": "escape", "command": "closeMarkersNavigation", | |
"when": "editorFocus && markersNavigationVisible" }, | |
{ "key": "f4", "command": "goToNextReferenceFromEmbeddedEditor", | |
"when": "inReferenceSearchEditor" }, | |
{ "key": "shift+f4", "command": "goToPreviousReferenceFromEmbeddedEditor", | |
"when": "inReferenceSearchEditor" }, | |
{ "key": "shift+escape", "command": "closeParameterHints", | |
"when": "editorTextFocus && parameterHintsVisible" }, | |
{ "key": "escape", "command": "closeParameterHints", | |
"when": "editorTextFocus && parameterHintsVisible" }, | |
{ "key": "alt+down", "command": "showNextParameterHint", | |
"when": "editorTextFocus && parameterHintsMultipleSignatures && parameterHintsVisible" }, | |
{ "key": "down", "command": "showNextParameterHint", | |
"when": "editorTextFocus && parameterHintsMultipleSignatures && parameterHintsVisible" }, | |
{ "key": "alt+up", "command": "showPrevParameterHint", | |
"when": "editorTextFocus && parameterHintsMultipleSignatures && parameterHintsVisible" }, | |
{ "key": "up", "command": "showPrevParameterHint", | |
"when": "editorTextFocus && parameterHintsMultipleSignatures && parameterHintsVisible" }, | |
{ "key": "tab", "command": "acceptSelectedSuggestion", | |
"when": "suggestWidgetVisible && textInputFocus" }, | |
{ "key": "enter", "command": "acceptSelectedSuggestionOnEnter", | |
"when": "acceptSuggestionOnEnter && suggestWidgetVisible && suggestionMakesTextEdit && textInputFocus" }, | |
{ "key": "shift+escape", "command": "hideSuggestWidget", | |
"when": "suggestWidgetVisible && textInputFocus" }, | |
{ "key": "escape", "command": "hideSuggestWidget", | |
"when": "suggestWidgetVisible && textInputFocus" }, | |
{ "key": "ctrl+pagedown", "command": "selectNextPageSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, | |
{ "key": "pagedown", "command": "selectNextPageSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, | |
{ "key": "ctrl+down", "command": "selectNextSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, | |
{ "key": "down", "command": "selectNextSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, | |
{ "key": "ctrl+pageup", "command": "selectPrevPageSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, | |
{ "key": "pageup", "command": "selectPrevPageSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, | |
{ "key": "ctrl+up", "command": "selectPrevSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, | |
{ "key": "up", "command": "selectPrevSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" }, | |
{ "key": "ctrl+space", "command": "toggleSuggestionDetails", | |
"when": "suggestWidgetVisible && textInputFocus" }, | |
{ "key": "ctrl+alt+space", "command": "toggleSuggestionFocus", | |
"when": "suggestWidgetVisible && textInputFocus" }, | |
{ "key": "enter", "command": "acceptRenameInput", | |
"when": "editorFocus && renameInputVisible" }, | |
{ "key": "shift+escape", "command": "cancelRenameInput", | |
"when": "editorFocus && renameInputVisible" }, | |
{ "key": "escape", "command": "cancelRenameInput", | |
"when": "editorFocus && renameInputVisible" }, | |
{ "key": "ctrl+shift+;", "command": "breadcrumbs.focus", | |
"when": "breadcrumbsVisible" }, | |
{ "key": "ctrl+shift+.", "command": "breadcrumbs.focusAndSelect", | |
"when": "breadcrumbsVisible" }, | |
{ "key": "ctrl+shift+[IntlBackslash]", "command": "breadcrumbs.focusAndSelect", | |
"when": "breadcrumbsVisible" }, | |
{ "key": "ctrl+right", "command": "breadcrumbs.focusNext", | |
"when": "breadcrumbsActive && breadcrumbsVisible" }, | |
{ "key": "right", "command": "breadcrumbs.focusNext", | |
"when": "breadcrumbsActive && breadcrumbsVisible" }, | |
{ "key": "ctrl+left", "command": "breadcrumbs.focusPrevious", | |
"when": "breadcrumbsActive && breadcrumbsVisible" }, | |
{ "key": "left", "command": "breadcrumbs.focusPrevious", | |
"when": "breadcrumbsActive && breadcrumbsVisible" }, | |
{ "key": "ctrl+enter", "command": "breadcrumbs.revealFocused", | |
"when": "breadcrumbsActive && breadcrumbsVisible" }, | |
{ "key": "space", "command": "breadcrumbs.revealFocused", | |
"when": "breadcrumbsActive && breadcrumbsVisible" }, | |
{ "key": "ctrl+enter", "command": "breadcrumbs.revealFocusedFromTreeAside", | |
"when": "breadcrumbsActive && breadcrumbsVisible && listFocus && !inputFocus" }, | |
{ "key": "down", "command": "breadcrumbs.selectFocused", | |
"when": "breadcrumbsActive && breadcrumbsVisible" }, | |
{ "key": "enter", "command": "breadcrumbs.selectFocused", | |
"when": "breadcrumbsActive && breadcrumbsVisible" }, | |
{ "key": "shift+escape", "command": "closeAccessibilityHelp", | |
"when": "accessibilityHelpWidgetVisible && editorFocus" }, | |
{ "key": "escape", "command": "closeAccessibilityHelp", | |
"when": "accessibilityHelpWidgetVisible && editorFocus" }, | |
{ "key": "escape", "command": "closeReplaceInFilesWidget", | |
"when": "replaceInputBoxFocus && searchViewletVisible" }, | |
{ "key": "ctrl+alt+c", "command": "copyFilePath", | |
"when": "!editorFocus" }, | |
{ "key": "ctrl+shift+alt+c", "command": "copyRelativeFilePath", | |
"when": "!editorFocus" }, | |
{ "key": "alt+enter", "command": "debug.openBreakpointToSide", | |
"when": "breakpointsFocused" }, | |
{ "key": "ctrl+enter", "command": "debug.openBreakpointToSide", | |
"when": "breakpointsFocused" }, | |
{ "key": "delete", "command": "debug.removeBreakpoint", | |
"when": "breakpointsFocused && !breakpointSelected" }, | |
{ "key": "delete", "command": "debug.removeWatchExpression", | |
"when": "watchExpressionsFocused && !expressionSelected" }, | |
{ "key": "shift+f9", "command": "editor.debug.action.toggleInlineBreakpoint", | |
"when": "editorTextFocus" }, | |
{ "key": "ctrl+enter", "command": "explorer.openToSide", | |
"when": "explorerViewletFocus && explorerViewletVisible && !inputFocus" }, | |
{ "key": "alt+down", "command": "history.showNext", | |
"when": "historyNavigationEnabled && historyNavigationWidget" }, | |
{ "key": "down", "command": "history.showNext", | |
"when": "historyNavigationEnabled && historyNavigationWidget" }, | |
{ "key": "alt+up", "command": "history.showPrevious", | |
"when": "historyNavigationEnabled && historyNavigationWidget" }, | |
{ "key": "up", "command": "history.showPrevious", | |
"when": "historyNavigationEnabled && historyNavigationWidget" }, | |
{ "key": "escape", "command": "keybindings.editor.clearSearchResults", | |
"when": "inKeybindings && inKeybindingsSearch" }, | |
{ "key": "ctrl+c", "command": "keybindings.editor.copyKeybindingEntry", | |
"when": "inKeybindings && keybindingFocus" }, | |
{ "key": "ctrl+k ctrl+k", "command": "keybindings.editor.defineKeybinding", | |
"when": "inKeybindings && keybindingFocus" }, | |
{ "key": "down", "command": "keybindings.editor.focusKeybindings", | |
"when": "inKeybindings && inKeybindingsSearch" }, | |
{ "key": "delete", "command": "keybindings.editor.removeKeybinding", | |
"when": "inKeybindings && keybindingFocus" }, | |
{ "key": "ctrl+f", "command": "keybindings.editor.searchKeybindings", | |
"when": "inKeybindings && keybindingFocus" }, | |
{ "key": "escape", "command": "list.clear", | |
"when": "listFocus && listHasSelectionOrFocus && !inputFocus" }, | |
{ "key": "left", "command": "list.collapse", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "ctrl+c", "command": "problems.action.copy", | |
"when": "problemFocus" }, | |
{ "key": "right", "command": "list.expand", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "shift+down", "command": "list.expandSelectionDown", | |
"when": "listFocus && listSupportsMultiselect && !inputFocus" }, | |
{ "key": "shift+up", "command": "list.expandSelectionUp", | |
"when": "listFocus && listSupportsMultiselect && !inputFocus" }, | |
{ "key": "down", "command": "list.focusDown", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "home", "command": "list.focusFirst", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "end", "command": "list.focusLast", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "pagedown", "command": "list.focusPageDown", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "pageup", "command": "list.focusPageUp", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "up", "command": "list.focusUp", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "enter", "command": "list.select", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "ctrl+a", "command": "list.selectAll", | |
"when": "listFocus && listSupportsMultiselect && !inputFocus" }, | |
{ "key": "space", "command": "list.toggleExpand", | |
"when": "listFocus && !inputFocus" }, | |
{ "key": "delete", "command": "notification.clear", | |
"when": "notificationFocus" }, | |
{ "key": "left", "command": "notification.collapse", | |
"when": "notificationFocus" }, | |
{ "key": "right", "command": "notification.expand", | |
"when": "notificationFocus" }, | |
{ "key": "enter", "command": "notification.toggle", | |
"when": "notificationFocus" }, | |
{ "key": "space", "command": "notification.toggle", | |
"when": "notificationFocus" }, | |
{ "key": "home", "command": "notifications.focusFirstToast", | |
"when": "notificationFocus && notificationToastsVisible" }, | |
{ "key": "pageup", "command": "notifications.focusFirstToast", | |
"when": "notificationFocus && notificationToastsVisible" }, | |
{ "key": "end", "command": "notifications.focusLastToast", | |
"when": "notificationFocus && notificationToastsVisible" }, | |
{ "key": "pagedown", "command": "notifications.focusLastToast", | |
"when": "notificationFocus && notificationToastsVisible" }, | |
{ "key": "down", "command": "notifications.focusNextToast", | |
"when": "notificationFocus && notificationToastsVisible" }, | |
{ "key": "up", "command": "notifications.focusPreviousToast", | |
"when": "notificationFocus && notificationToastsVisible" }, | |
{ "key": "down", "command": "outline.focusDownHighlighted", | |
"when": "outlineFiltered && outlineFocused" }, | |
{ "key": "up", "command": "outline.focusUpHighlighted", | |
"when": "outlineFiltered && outlineFocused" }, | |
{ "key": "ctrl+enter", "command": "problems.action.openToSide", | |
"when": "problemFocus" }, | |
{ "key": "ctrl+alt+r", "command": "revealFileInOS", | |
"when": "!editorFocus" }, | |
{ "key": "escape", "command": "search.action.cancel", | |
"when": "listFocus && searchViewletVisible && !inputFocus" }, | |
{ "key": "ctrl+c", "command": "search.action.copyMatch", | |
"when": "fileMatchOrMatchFocus" }, | |
{ "key": "ctrl+alt+c", "command": "search.action.copyPath", | |
"when": "fileMatchOrFolderMatchFocus" }, | |
{ "key": "f4", "command": "search.action.focusNextSearchResult", | |
"when": "hasSearchResult" }, | |
{ "key": "shift+f4", "command": "search.action.focusPreviousSearchResult", | |
"when": "hasSearchResult" }, | |
{ "key": "ctrl+up", "command": "search.action.focusSearchFromResults", | |
"when": "firstMatchFocus && searchViewletVisible" }, | |
{ "key": "ctrl+enter", "command": "search.action.openResultToSide", | |
"when": "fileMatchOrMatchFocus && searchViewletVisible" }, | |
{ "key": "delete", "command": "search.action.remove", | |
"when": "fileMatchOrMatchFocus && searchViewletVisible" }, | |
{ "key": "ctrl+shift+1", "command": "search.action.replace", | |
"when": "matchFocus && replaceActive && searchViewletVisible" }, | |
{ "key": "ctrl+alt+enter", "command": "search.action.replaceAll", | |
"when": "replaceActive && searchViewletVisible && !findWidgetVisible" }, | |
{ "key": "ctrl+shift+enter", "command": "search.action.replaceAllInFile", | |
"when": "fileMatchFocus && replaceActive && searchViewletVisible" }, | |
{ "key": "ctrl+shift+1", "command": "search.action.replaceAllInFile", | |
"when": "fileMatchFocus && replaceActive && searchViewletVisible" }, | |
{ "key": "ctrl+shift+enter", "command": "search.action.replaceAllInFolder", | |
"when": "folderMatchFocus && replaceActive && searchViewletVisible" }, | |
{ "key": "ctrl+shift+1", "command": "search.action.replaceAllInFolder", | |
"when": "folderMatchFocus && replaceActive && searchViewletVisible" }, | |
{ "key": "ctrl+down", "command": "search.focus.nextInputBox", | |
"when": "inputBoxFocus && searchViewletVisible" }, | |
{ "key": "ctrl+up", "command": "search.focus.previousInputBox", | |
"when": "inputBoxFocus && searchViewletVisible && !searchInputBoxFocus" }, | |
{ "key": "enter", "command": "settings.action.editFocusedSetting", | |
"when": "inSettingsEditor && settingRowFocused" }, | |
{ "key": "up", "command": "settings.action.focusSearchFromSettings", | |
"when": "firstSettingRowFocused && inSettingsEditor" }, | |
{ "key": "down", "command": "settings.action.focusSettingsFromSearch", | |
"when": "inSettingsSearch" }, | |
{ "key": "enter", "command": "settings.action.focusSettingsList", | |
"when": "inSettingsEditor && settingsTocRowFocus" }, | |
{ "key": "alt+c", "command": "toggleSearchCaseSensitive", | |
"when": "searchInputBoxFocus && searchViewletVisible" }, | |
{ "key": "alt+r", "command": "toggleSearchRegex", | |
"when": "searchInputBoxFocus && searchViewletVisible" }, | |
{ "key": "alt+w", "command": "toggleSearchWholeWord", | |
"when": "searchInputBoxFocus && searchViewletVisible" }, | |
{ "key": "ctrl+w", "command": "workbench.action.closeActiveEditor" }, | |
{ "key": "ctrl+k ctrl+w", "command": "workbench.action.closeAllEditors" }, | |
{ "key": "ctrl+k ctrl+shift+w", "command": "workbench.action.closeAllGroups" }, | |
{ "key": "ctrl+k w", "command": "workbench.action.closeEditorsInGroup" }, | |
{ "key": "ctrl+k f", "command": "workbench.action.closeFolder" }, | |
{ "key": "ctrl+w", "command": "workbench.action.closeGroup", | |
"when": "activeEditorGroupEmpty && multipleEditorGroups" }, | |
{ "key": "shift+escape", "command": "workbench.action.closeQuickOpen", | |
"when": "inQuickOpen" }, | |
{ "key": "escape", "command": "workbench.action.closeQuickOpen", | |
"when": "inQuickOpen" }, | |
{ "key": "ctrl+k u", "command": "workbench.action.closeUnmodifiedEditors" }, | |
{ "key": "ctrl+w", "command": "workbench.action.closeWindow", | |
"when": "!editorIsOpen && !multipleEditorGroups" }, | |
{ "key": "ctrl+shift+w", "command": "workbench.action.closeWindow" }, | |
{ "key": "f5", "command": "workbench.action.debug.continue", | |
"when": "inDebugMode" }, | |
{ "key": "f6", "command": "workbench.action.debug.pause", | |
"when": "inDebugMode" }, | |
{ "key": "ctrl+shift+f5", "command": "workbench.action.debug.restart", | |
"when": "inDebugMode" }, | |
{ "key": "ctrl+f5", "command": "workbench.action.debug.run", | |
"when": "!inDebugMode" }, | |
{ "key": "f5", "command": "workbench.action.debug.start", | |
"when": "!inDebugMode" }, | |
{ "key": "shift+f11", "command": "workbench.action.debug.stepOut", | |
"when": "inDebugMode" }, | |
{ "key": "f10", "command": "workbench.action.debug.stepOver", | |
"when": "inDebugMode" }, | |
{ "key": "shift+f5", "command": "workbench.action.debug.stop", | |
"when": "inDebugMode" }, | |
{ "key": "ctrl+k m", "command": "workbench.action.editor.changeLanguageMode" }, | |
{ "key": "ctrl+k p", "command": "workbench.action.files.copyPathOfActiveFile" }, | |
{ "key": "ctrl+n", "command": "workbench.action.files.newUntitledFile" }, | |
{ "key": "ctrl+o", "command": "workbench.action.files.openFile" }, | |
{ "key": "ctrl+k ctrl+o", "command": "workbench.action.files.openFolder" }, | |
{ "key": "ctrl+k r", "command": "workbench.action.files.revealActiveFileInWindows" }, | |
{ "key": "ctrl+s", "command": "workbench.action.files.save" }, | |
{ "key": "ctrl+shift+s", "command": "workbench.action.files.saveAs" }, | |
{ "key": "ctrl+k o", "command": "workbench.action.files.showOpenedFileInNewWindow" }, | |
{ "key": "ctrl+shift+f", "command": "workbench.action.findInFiles" }, | |
{ "key": "ctrl+k ctrl+up", "command": "workbench.action.focusAboveGroup" }, | |
{ "key": "ctrl+k ctrl+down", "command": "workbench.action.focusBelowGroup" }, | |
{ "key": "ctrl+8", "command": "workbench.action.focusEighthEditorGroup" }, | |
{ "key": "ctrl+5", "command": "workbench.action.focusFifthEditorGroup" }, | |
{ "key": "ctrl+1", "command": "workbench.action.focusFirstEditorGroup" }, | |
{ "key": "ctrl+4", "command": "workbench.action.focusFourthEditorGroup" }, | |
{ "key": "ctrl+k ctrl+left", "command": "workbench.action.focusLeftGroup" }, | |
{ "key": "ctrl+k ctrl+right", "command": "workbench.action.focusRightGroup" }, | |
{ "key": "ctrl+2", "command": "workbench.action.focusSecondEditorGroup" }, | |
{ "key": "ctrl+7", "command": "workbench.action.focusSeventhEditorGroup" }, | |
{ "key": "ctrl+0", "command": "workbench.action.focusSideBar" }, | |
{ "key": "ctrl+6", "command": "workbench.action.focusSixthEditorGroup" }, | |
{ "key": "ctrl+3", "command": "workbench.action.focusThirdEditorGroup" }, | |
{ "key": "ctrl+g", "command": "workbench.action.gotoLine" }, | |
{ "key": "ctrl+shift+o", "command": "workbench.action.gotoSymbol" }, | |
{ "key": "escape", "command": "workbench.action.hideInterfaceOverview", | |
"when": "interfaceOverviewVisible" }, | |
{ "key": "down", "command": "workbench.action.interactivePlayground.arrowDown", | |
"when": "interactivePlaygroundFocus && !editorTextFocus" }, | |
{ "key": "up", "command": "workbench.action.interactivePlayground.arrowUp", | |
"when": "interactivePlaygroundFocus && !editorTextFocus" }, | |
{ "key": "pagedown", "command": "workbench.action.interactivePlayground.pageDown", | |
"when": "interactivePlaygroundFocus && !editorTextFocus" }, | |
{ "key": "pageup", "command": "workbench.action.interactivePlayground.pageUp", | |
"when": "interactivePlaygroundFocus && !editorTextFocus" }, | |
{ "key": "ctrl+k enter", "command": "workbench.action.keepEditor" }, | |
{ "key": "ctrl+k ctrl+r", "command": "workbench.action.keybindingsReference" }, | |
{ "key": "ctrl+9", "command": "workbench.action.lastEditorInGroup" }, | |
{ "key": "alt+0", "command": "workbench.action.lastEditorInGroup" }, | |
{ "key": "ctrl+k down", "command": "workbench.action.moveActiveEditorGroupDown" }, | |
{ "key": "ctrl+k left", "command": "workbench.action.moveActiveEditorGroupLeft" }, | |
{ "key": "ctrl+k right", "command": "workbench.action.moveActiveEditorGroupRight" }, | |
{ "key": "ctrl+k up", "command": "workbench.action.moveActiveEditorGroupUp" }, | |
{ "key": "ctrl+shift+pageup", "command": "workbench.action.moveEditorLeftInGroup" }, | |
{ "key": "ctrl+shift+pagedown", "command": "workbench.action.moveEditorRightInGroup" }, | |
{ "key": "shift+alt+1", "command": "workbench.action.moveEditorToFirstGroup" }, | |
{ "key": "shift+alt+9", "command": "workbench.action.moveEditorToLastGroup" }, | |
{ "key": "ctrl+alt+right", "command": "workbench.action.moveEditorToNextGroup" }, | |
{ "key": "ctrl+alt+left", "command": "workbench.action.moveEditorToPreviousGroup" }, | |
{ "key": "ctrl+alt+-", "command": "workbench.action.navigateBack" }, | |
{ "key": "ctrl+shift+-", "command": "workbench.action.navigateForward" }, | |
{ "key": "ctrl+shift+n", "command": "workbench.action.newWindow" }, | |
{ "key": "ctrl+pagedown", "command": "workbench.action.nextEditor" }, | |
{ "key": "alt+1", "command": "workbench.action.openEditorAtIndex1" }, | |
{ "key": "alt+2", "command": "workbench.action.openEditorAtIndex2" }, | |
{ "key": "alt+3", "command": "workbench.action.openEditorAtIndex3" }, | |
{ "key": "alt+4", "command": "workbench.action.openEditorAtIndex4" }, | |
{ "key": "alt+5", "command": "workbench.action.openEditorAtIndex5" }, | |
{ "key": "alt+6", "command": "workbench.action.openEditorAtIndex6" }, | |
{ "key": "alt+7", "command": "workbench.action.openEditorAtIndex7" }, | |
{ "key": "alt+8", "command": "workbench.action.openEditorAtIndex8" }, | |
{ "key": "alt+9", "command": "workbench.action.openEditorAtIndex9" }, | |
{ "key": "ctrl+k ctrl+s", "command": "workbench.action.openGlobalKeybindings" }, | |
{ "key": "ctrl+tab", "command": "workbench.action.openNextRecentlyUsedEditorInGroup" }, | |
{ "key": "ctrl+shift+tab", "command": "workbench.action.openPreviousRecentlyUsedEditorInGroup" }, | |
{ "key": "ctrl+r", "command": "workbench.action.openRecent" }, | |
{ "key": "ctrl+,", "command": "workbench.action.openSettings" }, | |
{ "key": "ctrl+k ctrl+h", "command": "workbench.action.output.toggleOutput" }, | |
{ "key": "ctrl+pageup", "command": "workbench.action.previousEditor" }, | |
{ "key": "ctrl+e", "command": "workbench.action.quickOpen" }, | |
{ "key": "ctrl+p", "command": "workbench.action.quickOpen" }, | |
{ "key": "ctrl+q", "command": "workbench.action.quit" }, | |
{ "key": "ctrl+shift+t", "command": "workbench.action.reopenClosedEditor" }, | |
{ "key": "ctrl+shift+h", "command": "workbench.action.replaceInFiles" }, | |
{ "key": "ctrl+shift+j", "command": "workbench.action.search.toggleQueryDetails", | |
"when": "searchViewletVisible" }, | |
{ "key": "ctrl+k ctrl+t", "command": "workbench.action.selectTheme" }, | |
{ "key": "ctrl+k ctrl+p", "command": "workbench.action.showAllEditors" }, | |
{ "key": "ctrl+t", "command": "workbench.action.showAllSymbols" }, | |
{ "key": "f1", "command": "workbench.action.showCommands" }, | |
{ "key": "ctrl+shift+p", "command": "workbench.action.showCommands" }, | |
{ "key": "ctrl+\\", "command": "workbench.action.splitEditor" }, | |
{ "key": "ctrl+k ctrl+\\", "command": "workbench.action.splitEditorOrthogonal" }, | |
{ "key": "ctrl+shift+b", "command": "workbench.action.tasks.build" }, | |
{ "key": "escape", "command": "workbench.action.terminal.clearSelection", | |
"when": "terminalFocus && terminalTextSelected && !terminalFindWidgetVisible" }, | |
{ "key": "ctrl+shift+c", "command": "workbench.action.terminal.copySelection", | |
"when": "terminalFocus && terminalTextSelected" }, | |
{ "key": "ctrl+backspace", "command": "workbench.action.terminal.deleteWordLeft", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+delete", "command": "workbench.action.terminal.deleteWordRight", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+f", "command": "workbench.action.terminal.focusFindWidget", | |
"when": "terminalFocus" }, | |
{ "key": "alt+down", "command": "workbench.action.terminal.focusNextPane", | |
"when": "terminalFocus" }, | |
{ "key": "alt+right", "command": "workbench.action.terminal.focusNextPane", | |
"when": "terminalFocus" }, | |
{ "key": "alt+up", "command": "workbench.action.terminal.focusPreviousPane", | |
"when": "terminalFocus" }, | |
{ "key": "alt+left", "command": "workbench.action.terminal.focusPreviousPane", | |
"when": "terminalFocus" }, | |
{ "key": "shift+escape", "command": "workbench.action.terminal.hideFindWidget", | |
"when": "terminalFindWidgetVisible && terminalFocus" }, | |
{ "key": "escape", "command": "workbench.action.terminal.hideFindWidget", | |
"when": "terminalFindWidgetVisible && terminalFocus" }, | |
{ "key": "ctrl+shift+`", "command": "workbench.action.terminal.new" }, | |
{ "key": "ctrl+shift+c", "command": "workbench.action.terminal.openNativeConsole", | |
"when": "!terminalFocus" }, | |
{ "key": "ctrl+shift+v", "command": "workbench.action.terminal.paste", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+shift+down", "command": "workbench.action.terminal.resizePaneDown", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+shift+left", "command": "workbench.action.terminal.resizePaneLeft", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+shift+right", "command": "workbench.action.terminal.resizePaneRight", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+shift+up", "command": "workbench.action.terminal.resizePaneUp", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+shift+down", "command": "workbench.action.terminal.scrollDown", | |
"when": "terminalFocus" }, | |
{ "key": "shift+pagedown", "command": "workbench.action.terminal.scrollDownPage", | |
"when": "terminalFocus" }, | |
{ "key": "shift+end", "command": "workbench.action.terminal.scrollToBottom", | |
"when": "terminalFocus" }, | |
{ "key": "shift+home", "command": "workbench.action.terminal.scrollToTop", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+shift+up", "command": "workbench.action.terminal.scrollUp", | |
"when": "terminalFocus" }, | |
{ "key": "shift+pageup", "command": "workbench.action.terminal.scrollUpPage", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+shift+5", "command": "workbench.action.terminal.split", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+\\", "command": "workbench.action.terminal.split", | |
"when": "terminalFocus" }, | |
{ "key": "ctrl+`", "command": "workbench.action.terminal.toggleTerminal" }, | |
{ "key": "shift+alt+0", "command": "workbench.action.toggleEditorGroupLayout" }, | |
{ "key": "f11", "command": "workbench.action.toggleFullScreen" }, | |
{ "key": "ctrl+j", "command": "workbench.action.togglePanel" }, | |
{ "key": "ctrl+b", "command": "workbench.action.toggleSidebarVisibility" }, | |
{ "key": "ctrl+meta+w", "command": "workbench.action.toggleTabsVisibility" }, | |
{ "key": "ctrl+k z", "command": "workbench.action.toggleZenMode" }, | |
{ "key": "ctrl+numpad_add", "command": "workbench.action.zoomIn" }, | |
{ "key": "ctrl+shift+=", "command": "workbench.action.zoomIn" }, | |
{ "key": "ctrl+=", "command": "workbench.action.zoomIn" }, | |
{ "key": "ctrl+numpad_subtract", "command": "workbench.action.zoomOut" }, | |
{ "key": "ctrl+-", "command": "workbench.action.zoomOut" }, | |
{ "key": "ctrl+numpad0", "command": "workbench.action.zoomReset" }, | |
{ "key": "ctrl+shift+m", "command": "workbench.actions.view.problems" }, | |
{ "key": "ctrl+shift+y", "command": "workbench.debug.action.toggleRepl" }, | |
{ "key": "ctrl+k ctrl+m", "command": "workbench.extensions.action.showRecommendedKeymapExtensions" }, | |
{ "key": "ctrl+k c", "command": "workbench.files.action.compareWithClipboard" }, | |
{ "key": "ctrl+k d", "command": "workbench.files.action.compareWithSaved" }, | |
{ "key": "ctrl+k e", "command": "workbench.files.action.focusOpenEditorsView" }, | |
{ "key": "ctrl+shift+d", "command": "workbench.view.debug" }, | |
{ "key": "ctrl+shift+e", "command": "workbench.view.explorer" }, | |
{ "key": "ctrl+shift+x", "command": "workbench.view.extensions" }, | |
{ "key": "ctrl+shift+g", "command": "workbench.view.scm" }, | |
{ "key": "ctrl+shift+f", "command": "workbench.view.search", | |
"when": "!searchViewletVisible" }, | |
{ "key": "escape", "command": "breadcrumbs.selectEditor", | |
"when": "breadcrumbsActive && breadcrumbsVisible" }, | |
{ "key": "f11", "command": "workbench.action.debug.stepInto", | |
"when": "inDebugMode" }, | |
{ "key": "f2", "command": "debug.renameWatchExpression", | |
"when": "watchExpressionsFocused" }, | |
{ "key": "f2", "command": "debug.setVariable", | |
"when": "variablesFocused" }, | |
{ "key": "space", "command": "debug.toggleBreakpoint", | |
"when": "breakpointsFocused && !inputFocus" }, | |
{ "key": "shift+delete", "command": "deleteFile", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" }, | |
{ "key": "ctrl+c", "command": "filesExplorer.copy", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus" }, | |
{ "key": "ctrl+v", "command": "filesExplorer.paste", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus" }, | |
{ "key": "delete", "command": "moveFileToTrash", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" }, | |
{ "key": "f2", "command": "renameFile", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" }, | |
{ "key": "shift+escape", "command": "closeReferenceSearch", | |
"when": "referenceSearchVisible && !config.editor.stablePeek" }, | |
{ "key": "escape", "command": "closeReferenceSearch", | |
"when": "referenceSearchVisible && !config.editor.stablePeek" }, | |
{ "key": "f4", "command": "goToNextReference", | |
"when": "referenceSearchVisible" }, | |
{ "key": "shift+f4", "command": "goToPreviousReference", | |
"when": "referenceSearchVisible" }, | |
{ "key": "escape", "command": "notifications.hideList", | |
"when": "notificationCenterVisible" }, | |
{ "key": "escape", "command": "notifications.hideToasts", | |
"when": "notificationToastsVisible" }, | |
{ "key": "ctrl+alt+-", "command": "workbench.action.quickInputBack", | |
"when": "inQuickOpen" }, | |
{ "key": "ctrl+tab", "command": "workbench.action.quickOpenNavigateNextInEditorPicker", | |
"when": "inEditorsPicker && inQuickOpen" }, | |
{ "key": "ctrl+e", "command": "workbench.action.quickOpenNavigateNextInFilePicker", | |
"when": "inFilesPicker && inQuickOpen" }, | |
{ "key": "ctrl+p", "command": "workbench.action.quickOpenNavigateNextInFilePicker", | |
"when": "inFilesPicker && inQuickOpen" }, | |
{ "key": "ctrl+r", "command": "workbench.action.quickOpenNavigateNextInRecentFilesPicker", | |
"when": "inQuickOpen && inRecentFilesPicker" }, | |
{ "key": "ctrl+shift+tab", "command": "workbench.action.quickOpenNavigatePreviousInEditorPicker", | |
"when": "inEditorsPicker && inQuickOpen" }, | |
{ "key": "ctrl+shift+e", "command": "workbench.action.quickOpenNavigatePreviousInFilePicker", | |
"when": "inFilesPicker && inQuickOpen" }, | |
{ "key": "ctrl+shift+p", "command": "workbench.action.quickOpenNavigatePreviousInFilePicker", | |
"when": "inFilesPicker && inQuickOpen" }, | |
{ "key": "ctrl+shift+r", "command": "workbench.action.quickOpenNavigatePreviousInRecentFilesPicker", | |
"when": "inQuickOpen && inRecentFilesPicker" }, | |
{ "key": "ctrl+f4", "command": "extension.node-debug.pickLoadedScript", | |
"when": "debugType == 'node'" }, | |
{ "key": "ctrl+f4", "command": "extension.node-debug.pickLoadedScript", | |
"when": "debugType == 'node2'" }, | |
{ "key": "ctrl+shift+v", "command": "markdown.showPreview", | |
"when": "editorLangId == 'markdown'" }, | |
{ "key": "ctrl+k v", "command": "markdown.showPreviewToSide", | |
"when": "editorLangId == 'markdown'" }, | |
{ "key": "shift+enter", "command": "python.execSelectionInTerminal", | |
"when": "editorFocus && !findInputFocussed && !replaceInputFocussed && editorLangId == 'python'" } | |
] | |
// Here are other available commands: | |
// - acceptSnippet | |
// - actions.findWithSelection | |
// - addRootFolder | |
// - breadcrumbs.toggle | |
// - columnSelect | |
// - compareFiles | |
// - compareSelected | |
// - compositionEnd | |
// - compositionStart | |
// - createCursor | |
// - cursorColumnSelectDown | |
// - cursorColumnSelectLeft | |
// - cursorColumnSelectPageDown | |
// - cursorColumnSelectPageUp | |
// - cursorColumnSelectRight | |
// - cursorColumnSelectUp | |
// - cursorLineEnd | |
// - cursorLineStart | |
// - cursorWordEndLeft | |
// - cursorWordEndLeftSelect | |
// - cursorWordLeft | |
// - cursorWordLeftSelect | |
// - cursorWordPartLeft | |
// - cursorWordPartLeftSelect | |
// - cursorWordPartRight | |
// - cursorWordPartRightSelect | |
// - cursorWordPartStartLeft | |
// - cursorWordPartStartLeftSelect | |
// - cursorWordRight | |
// - cursorWordRightSelect | |
// - cursorWordStartRight | |
// - cursorWordStartRightSelect | |
// - cut | |
// - debug.addConfiguration | |
// - debug.enableOrDisableBreakpoint | |
// - debug.installAdditionalDebuggers | |
// - default:compositionEnd | |
// - default:compositionStart | |
// - default:cut | |
// - default:paste | |
// - default:redo | |
// - default:replacePreviousChar | |
// - default:type | |
// - default:undo | |
// - deleteAllLeft | |
// - deleteAllRight | |
// - deleteWordEndLeft | |
// - deleteWordEndRight | |
// - deleteWordPartLeft | |
// - deleteWordPartRight | |
// - deleteWordStartLeft | |
// - deleteWordStartRight | |
// - dev.stats.loader | |
// - editor.action.addSelectionToPreviousFindMatch | |
// - editor.action.clearoutput | |
// - editor.action.clipboardCopyWithSyntaxHighlightingAction | |
// - editor.action.codeAction | |
// - editor.action.detectIndentation | |
// - editor.action.findReferences | |
// - editor.action.fontZoomIn | |
// - editor.action.fontZoomOut | |
// - editor.action.fontZoomReset | |
// - editor.action.format | |
// - editor.action.goToTypeDefinition | |
// - editor.action.indentUsingSpaces | |
// - editor.action.indentUsingTabs | |
// - editor.action.indentationToSpaces | |
// - editor.action.indentationToTabs | |
// - editor.action.insertSnippet | |
// - editor.action.inspectTMScopes | |
// - editor.action.joinLines | |
// - editor.action.marker.next | |
// - editor.action.marker.prev | |
// - editor.action.moveCarretLeftAction | |
// - editor.action.moveCarretRightAction | |
// - editor.action.moveSelectionToPreviousFindMatch | |
// - editor.action.nextCommentThreadAction | |
// - editor.action.openLink | |
// - editor.action.peekTypeDefinition | |
// - editor.action.reindentlines | |
// - editor.action.reindentselectedlines | |
// - editor.action.selectToBracket | |
// - editor.action.showSnippets | |
// - editor.action.sortLinesAscending | |
// - editor.action.sortLinesDescending | |
// - editor.action.sourceAction | |
// - editor.action.toggleMinimap | |
// - editor.action.toggleRenderControlCharacter | |
// - editor.action.toggleRenderWhitespace | |
// - editor.action.transformToLowercase | |
// - editor.action.transformToUppercase | |
// - editor.action.transpose | |
// - editor.action.transposeLetters | |
// - editor.debug.action.conditionalBreakpoint | |
// - editor.debug.action.goToNextBreakpoint | |
// - editor.debug.action.goToPreviousBreakpoint | |
// - editor.debug.action.runToCursor | |
// - editor.debug.action.selectionToRepl | |
// - editor.debug.action.selectionToWatch | |
// - editor.debug.action.toggleLogPoint | |
// - editor.emmet.action.balanceIn | |
// - editor.emmet.action.balanceOut | |
// - editor.emmet.action.decrementNumberByOne | |
// - editor.emmet.action.decrementNumberByOneTenth | |
// - editor.emmet.action.decrementNumberByTen | |
// - editor.emmet.action.evaluateMathExpression | |
// - editor.emmet.action.incrementNumberByOne | |
// - editor.emmet.action.incrementNumberByOneTenth | |
// - editor.emmet.action.incrementNumberByTen | |
// - editor.emmet.action.matchTag | |
// - editor.emmet.action.mergeLines | |
// - editor.emmet.action.nextEditPoint | |
// - editor.emmet.action.prevEditPoint | |
// - editor.emmet.action.reflectCSSValue | |
// - editor.emmet.action.removeTag | |
// - editor.emmet.action.selectNextItem | |
// - editor.emmet.action.selectPrevItem | |
// - editor.emmet.action.splitJoinTag | |
// - editor.emmet.action.toggleComment | |
// - editor.emmet.action.updateImageSize | |
// - editor.emmet.action.updateTag | |
// - editor.emmet.action.wrapIndividualLinesWithAbbreviation | |
// - editor.emmet.action.wrapWithAbbreviation | |
// - emmet.expandAbbreviation | |
// - eslint.applyAllFixes | |
// - eslint.applyAutoFix | |
// - eslint.applySameFixes | |
// - eslint.applySingleFix | |
// - eslint.createConfig | |
// - eslint.disable | |
// - eslint.enable | |
// - eslint.executeAutofix | |
// - eslint.showOutputChannel | |
// - explorer.newFile | |
// - explorer.newFolder | |
// - extension.node-debug.toggleAutoAttach | |
// - filesExplorer.findInFolder | |
// - filesExplorer.findInWorkspace | |
// - git._syncAll | |
// - git.branch | |
// - git.checkout | |
// - git.clean | |
// - git.cleanAll | |
// - git.clone | |
// - git.close | |
// - git.commit | |
// - git.commitAll | |
// - git.commitAllAmend | |
// - git.commitAllSigned | |
// - git.commitStaged | |
// - git.commitStagedAmend | |
// - git.commitStagedSigned | |
// - git.commitWithInput | |
// - git.createTag | |
// - git.deleteBranch | |
// - git.fetch | |
// - git.ignore | |
// - git.init | |
// - git.merge | |
// - git.openChange | |
// - git.openFile | |
// - git.openFile2 | |
// - git.openHEADFile | |
// - git.openRepository | |
// - git.openResource | |
// - git.publish | |
// - git.pull | |
// - git.pullFrom | |
// - git.pullRebase | |
// - git.push | |
// - git.pushTo | |
// - git.pushWithTags | |
// - git.refresh | |
// - git.renameBranch | |
// - git.revertChange | |
// - git.revertSelectedRanges | |
// - git.showOutput | |
// - git.stage | |
// - git.stageAll | |
// - git.stageChange | |
// - git.stageSelectedRanges | |
// - git.stash | |
// - git.stashIncludeUntracked | |
// - git.stashPop | |
// - git.stashPopLatest | |
// - git.sync | |
// - git.syncRebase | |
// - git.undoCommit | |
// - git.unstage | |
// - git.unstageAll | |
// - git.unstageSelectedRanges | |
// - javascript.goToProjectConfig | |
// - javascript.reloadProjects | |
// - js.projectStatus.command | |
// - keybindings.editor.copyCommandKeybindingEntry | |
// - keybindings.editor.resetKeybinding | |
// - keybindings.editor.showConflicts | |
// - lastCursorLineSelect | |
// - lastCursorLineSelectDrag | |
// - lastCursorWordSelect | |
// - layoutEditorGroups | |
// - lineBreakInsert | |
// - list.focusFirstChild | |
// - list.focusLastChild | |
// - markdown.preview.refresh | |
// - markdown.preview.toggleLock | |
// - markdown.showLockedPreviewToSide | |
// - markdown.showPreviewSecuritySelector | |
// - markdown.showSource | |
// - merge-conflict.accept.all-both | |
// - merge-conflict.accept.all-current | |
// - merge-conflict.accept.all-incoming | |
// - merge-conflict.accept.both | |
// - merge-conflict.accept.current | |
// - merge-conflict.accept.incoming | |
// - merge-conflict.accept.selection | |
// - merge-conflict.compare | |
// - merge-conflict.next | |
// - merge-conflict.previous | |
// - notifications.clearAll | |
// - notifications.focusToasts | |
// - notifications.showList | |
// - notifications.toggleList | |
// - npm.debugScript | |
// - npm.debugScriptFromHover | |
// - npm.openScript | |
// - npm.refresh | |
// - npm.runInstall | |
// - npm.runScript | |
// - npm.runScriptFromHover | |
// - npm.runSelectedScript | |
// - openInTerminal | |
// - outline.focus | |
// - paste | |
// - problems.action.copyMessage | |
// - problems.action.copyRelatedInformationMessage | |
// - removeRootFolder | |
// - repl.action.copyAll | |
// - replacePreviousChar | |
// - revealInExplorer | |
// - saveAll | |
// - search.action.clearHistory | |
// - search.action.clearSearchResults | |
// - search.action.collapseSearchResults | |
// - search.action.copyAll | |
// - search.action.focusSearchList | |
// - search.action.refreshSearchResults | |
// - search.action.toggleSearchViewPosition | |
// - selectAll | |
// - selectFirstSuggestion | |
// - selectForCompare | |
// - selectLastSuggestion | |
// - setContext | |
// - setSelection | |
// - toggle.diff.editorMode | |
// - toggleEscapeSequenceLogging | |
// - tslint.createConfig | |
// - tslint.fixAllProblems | |
// - tslint.showOutputChannel | |
// - type | |
// - typescript.goToProjectConfig | |
// - typescript.openTsServerLog | |
// - typescript.reloadProjects | |
// - typescript.restartTsServer | |
// - typescript.selectTypeScriptVersion | |
// - update.showCurrentReleaseNotes | |
// - workbench.action.acceptSelectedQuickOpenItem | |
// - workbench.action.addRootFolder | |
// - workbench.action.appPerf | |
// - workbench.action.clearCommandHistory | |
// - workbench.action.clearEditorHistory | |
// - workbench.action.clearRecentFiles | |
// - workbench.action.closeEditorsAndGroup | |
// - workbench.action.closeEditorsInOtherGroups | |
// - workbench.action.closeEditorsToTheLeft | |
// - workbench.action.closeEditorsToTheRight | |
// - workbench.action.closeOtherEditors | |
// - workbench.action.closePanel | |
// - workbench.action.compareEditor.nextChange | |
// - workbench.action.compareEditor.previousChange | |
// - workbench.action.configureLanguageBasedSettings | |
// - workbench.action.configureLocale | |
// - workbench.action.debug.configure | |
// - workbench.action.debug.disconnect | |
// - workbench.action.debug.selectandstart | |
// - workbench.action.debug.terminateThread | |
// - workbench.action.decreaseViewSize | |
// - workbench.action.duplicateWorkspaceInNewWindow | |
// - workbench.action.editor.changeEOL | |
// - workbench.action.editor.changeEncoding | |
// - workbench.action.editorLayoutSingle | |
// - workbench.action.editorLayoutThreeColumns | |
// - workbench.action.editorLayoutThreeRows | |
// - workbench.action.editorLayoutTwoByTwoGrid | |
// - workbench.action.editorLayoutTwoColumns | |
// - workbench.action.editorLayoutTwoColumnsBottom | |
// - workbench.action.editorLayoutTwoRows | |
// - workbench.action.editorLayoutTwoRowsRight | |
// - workbench.action.evenEditorWidths | |
// - workbench.action.files.openFileFolderInNewWindow | |
// - workbench.action.files.openFileInNewWindow | |
// - workbench.action.files.openFolderInNewWindow | |
// - workbench.action.files.revert | |
// - workbench.action.files.saveAll | |
// - workbench.action.files.saveFiles | |
// - workbench.action.firstEditorInGroup | |
// - workbench.action.focusActiveEditorGroup | |
// - workbench.action.focusLastEditorGroup | |
// - workbench.action.focusNextGroup | |
// - workbench.action.focusPanel | |
// - workbench.action.focusPreviousGroup | |
// - workbench.action.focusQuickOpen | |
// - workbench.action.generateColorTheme | |
// - workbench.action.increaseViewSize | |
// - workbench.action.inspectContextKeys | |
// - workbench.action.inspectKeyMappings | |
// - workbench.action.joinAllGroups | |
// - workbench.action.joinTwoGroups | |
// - workbench.action.maximizeEditor | |
// - workbench.action.minimizeOtherEditors | |
// - workbench.action.moveEditorToAboveGroup | |
// - workbench.action.moveEditorToBelowGroup | |
// - workbench.action.moveEditorToLeftGroup | |
// - workbench.action.moveEditorToRightGroup | |
// - workbench.action.navigateDown | |
// - workbench.action.navigateEditorGroups | |
// - workbench.action.navigateLast | |
// - workbench.action.navigateLeft | |
// - workbench.action.navigateRight | |
// - workbench.action.navigateUp | |
// - workbench.action.newGroupAbove | |
// - workbench.action.newGroupBelow | |
// - workbench.action.newGroupLeft | |
// - workbench.action.newGroupRight | |
// - workbench.action.nextEditorInGroup | |
// - workbench.action.openActiveLogOutputFile | |
// - workbench.action.openDefaultKeybindingsFile | |
// - workbench.action.openDocumentationUrl | |
// - workbench.action.openFolderSettings | |
// - workbench.action.openGlobalKeybindingsFile | |
// - workbench.action.openGlobalSettings | |
// - workbench.action.openIntroductoryVideosUrl | |
// - workbench.action.openIssueReporter | |
// - workbench.action.openLicenseUrl | |
// - workbench.action.openLogFile | |
// - workbench.action.openLogViewer | |
// - workbench.action.openLogsFolder | |
// - workbench.action.openNextRecentlyUsedEditor | |
// - workbench.action.openPreviousEditorFromHistory | |
// - workbench.action.openPreviousRecentlyUsedEditor | |
// - workbench.action.openPrivacyStatementUrl | |
// - workbench.action.openProcessExplorer | |
// - workbench.action.openRawDefaultSettings | |
// - workbench.action.openRequestFeatureUrl | |
// - workbench.action.openSettings2 | |
// - workbench.action.openSnippets | |
// - workbench.action.openTipsAndTricksUrl | |
// - workbench.action.openTwitterUrl | |
// - workbench.action.openView | |
// - workbench.action.openWorkspace | |
// - workbench.action.openWorkspaceConfigFile | |
// - workbench.action.openWorkspaceInNewWindow | |
// - workbench.action.openWorkspaceSettings | |
// - workbench.action.previousEditorInGroup | |
// - workbench.action.problems.focus | |
// - workbench.action.quickOpenNavigateNext | |
// - workbench.action.quickOpenNavigateNextInTerminalPicker | |
// - workbench.action.quickOpenNavigateNextInViewPicker | |
// - workbench.action.quickOpenNavigatePrevious | |
// - workbench.action.quickOpenNavigatePreviousInTerminalPicker | |
// - workbench.action.quickOpenNavigatePreviousInViewPicker | |
// - workbench.action.quickOpenPreviousEditor | |
// - workbench.action.quickOpenRecent | |
// - workbench.action.quickOpenSelectNext | |
// - workbench.action.quickOpenSelectPrevious | |
// - workbench.action.quickOpenTerm | |
// - workbench.action.quickOpenView | |
// - workbench.action.quickPickManyToggle | |
// - workbench.action.quickSwitchWindow | |
// - workbench.action.reloadWindow | |
// - workbench.action.reloadWindowWithExtensionsDisabled | |
// - workbench.action.removeFromEditorHistory | |
// - workbench.action.removeRootFolder | |
// - workbench.action.reportPerformanceIssueUsingReporter | |
// - workbench.action.revertAndCloseActiveEditor | |
// - workbench.action.saveWorkspaceAs | |
// - workbench.action.selectIconTheme | |
// - workbench.action.setLogLevel | |
// - workbench.action.showAboutDialog | |
// - workbench.action.showEditorsInActiveGroup | |
// - workbench.action.showEditorsInGroup | |
// - workbench.action.showEmmetCommands | |
// - workbench.action.showErrorsWarnings | |
// - workbench.action.showInteractivePlayground | |
// - workbench.action.showInterfaceOverview | |
// - workbench.action.showLogs | |
// - workbench.action.showRuntimeExtensions | |
// - workbench.action.showWelcomePage | |
// - workbench.action.splitEditorDown | |
// - workbench.action.splitEditorLeft | |
// - workbench.action.splitEditorRight | |
// - workbench.action.splitEditorUp | |
// - workbench.action.switchWindow | |
// - workbench.action.tasks.configureDefaultBuildTask | |
// - workbench.action.tasks.configureDefaultTestTask | |
// - workbench.action.tasks.configureTaskRunner | |
// - workbench.action.tasks.restartTask | |
// - workbench.action.tasks.runTask | |
// - workbench.action.tasks.showLog | |
// - workbench.action.tasks.showTasks | |
// - workbench.action.tasks.terminate | |
// - workbench.action.tasks.test | |
// - workbench.action.terminal.allowWorkspaceShell | |
// - workbench.action.terminal.clear | |
// - workbench.action.terminal.disallowWorkspaceShell | |
// - workbench.action.terminal.focus | |
// - workbench.action.terminal.focusAtIndex1 | |
// - workbench.action.terminal.focusAtIndex2 | |
// - workbench.action.terminal.focusAtIndex3 | |
// - workbench.action.terminal.focusAtIndex4 | |
// - workbench.action.terminal.focusAtIndex5 | |
// - workbench.action.terminal.focusAtIndex6 | |
// - workbench.action.terminal.focusAtIndex7 | |
// - workbench.action.terminal.focusAtIndex8 | |
// - workbench.action.terminal.focusAtIndex9 | |
// - workbench.action.terminal.focusNext | |
// - workbench.action.terminal.focusPrevious | |
// - workbench.action.terminal.kill | |
// - workbench.action.terminal.moveToLineEnd | |
// - workbench.action.terminal.moveToLineStart | |
// - workbench.action.terminal.newInActiveWorkspace | |
// - workbench.action.terminal.rename | |
// - workbench.action.terminal.runActiveFile | |
// - workbench.action.terminal.runSelectedText | |
// - workbench.action.terminal.scrollToNextCommand | |
// - workbench.action.terminal.scrollToPreviousCommand | |
// - workbench.action.terminal.selectAll | |
// - workbench.action.terminal.selectToNextCommand | |
// - workbench.action.terminal.selectToNextLine | |
// - workbench.action.terminal.selectToPreviousCommand | |
// - workbench.action.terminal.selectToPreviousLine | |
// - workbench.action.terminal.splitInActiveWorkspace | |
// - workbench.action.toggleActivityBarVisibility | |
// - workbench.action.toggleAutoSave | |
// - workbench.action.toggleCenteredLayout | |
// - workbench.action.toggleDevTools | |
// - workbench.action.toggleMaximizedPanel | |
// - workbench.action.toggleMenuBar | |
// - workbench.action.toggleMultiCursorModifier | |
// - workbench.action.togglePanelPosition | |
// - workbench.action.toggleSharedProcess | |
// - workbench.action.toggleSidebarPosition | |
// - workbench.action.toggleStatusbarVisibility | |
// - workbench.action.url.openUrl | |
// - workbench.action.webview.openDeveloperTools | |
// - workbench.action.webview.reloadWebviewAction | |
// - workbench.debug.action.focusBreakpointsView | |
// - workbench.debug.action.focusCallStackView | |
// - workbench.debug.action.focusRepl | |
// - workbench.debug.action.focusVariablesView | |
// - workbench.debug.action.focusWatchView | |
// - workbench.debug.panel.action.clearReplAction | |
// - workbench.debug.viewlet.action.addFunctionBreakpointAction | |
// - workbench.debug.viewlet.action.disableAllBreakpoints | |
// - workbench.debug.viewlet.action.enableAllBreakpoints | |
// - workbench.debug.viewlet.action.reapplyBreakpointsAction | |
// - workbench.debug.viewlet.action.removeAllBreakpoints | |
// - workbench.extensions.action.addToWorkspaceFolderIgnoredRecommendations | |
// - workbench.extensions.action.addToWorkspaceFolderRecommendations | |
// - workbench.extensions.action.addToWorkspaceIgnoredRecommendations | |
// - workbench.extensions.action.addToWorkspaceRecommendations | |
// - workbench.extensions.action.checkForUpdates | |
// - workbench.extensions.action.configureWorkspaceFolderRecommendedExtensions | |
// - workbench.extensions.action.configureWorkspaceRecommendedExtensions | |
// - workbench.extensions.action.disableAll | |
// - workbench.extensions.action.disableAllWorkspace | |
// - workbench.extensions.action.disableAutoUpdate | |
// - workbench.extensions.action.enableAll | |
// - workbench.extensions.action.enableAllWorkspace | |
// - workbench.extensions.action.enableAutoUpdate | |
// - workbench.extensions.action.installExtensions | |
// - workbench.extensions.action.installVSIX | |
// - workbench.extensions.action.listBuiltInExtensions | |
// - workbench.extensions.action.listOutdatedExtensions | |
// - workbench.extensions.action.openExtensionsFolder | |
// - workbench.extensions.action.reinstall | |
// - workbench.extensions.action.showAzureExtensions | |
// - workbench.extensions.action.showDisabledExtensions | |
// - workbench.extensions.action.showEnabledExtensions | |
// - workbench.extensions.action.showExtensionsForLanguage | |
// - workbench.extensions.action.showExtensionsWithIds | |
// - workbench.extensions.action.showInstalledExtensions | |
// - workbench.extensions.action.showLanguageExtensions | |
// - workbench.extensions.action.showPopularExtensions | |
// - workbench.extensions.action.showRecommendedExtensions | |
// - workbench.extensions.action.updateAllExtensions | |
// - workbench.files.action.acceptLocalChanges | |
// - workbench.files.action.collapseExplorerFolders | |
// - workbench.files.action.compareFileWith | |
// - workbench.files.action.focusFilesExplorer | |
// - workbench.files.action.refreshFilesExplorer | |
// - workbench.files.action.revertLocalChanges | |
// - workbench.files.action.saveAllInGroup | |
// - workbench.files.action.showActiveFileInExplorer | |
// - workbench.output.action.clearOutput | |
// - workbench.view.extension.test |
This file contains 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
octokit.repos | |
.listForUser({ | |
username: 'Tyumeijie' | |
}) | |
.then((res) => { | |
console.log(res.data[0].full_name); | |
}); | |
.then(({ data, headers, status }) => { | |
console.log('data: ', data); | |
console.log('header: ', headers); | |
console.log('status: ', status); | |
}); |
This file contains 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
(function prettyprint() { | |
var iframe = document.createElement('IFRAME'); | |
var print = function (ele) { | |
document.body.appendChild(iframe); | |
doc = iframe.contentWindow.document; | |
doc.write(ele.outerHTML); | |
doc.close(); | |
iframe.contentWindow.focus(); | |
iframe.contentWindow.print(); | |
} | |
var terminate = document.getElementsByClassName('btns')[0]; | |
terminate.style.display = 'none'; | |
var content = document.getElementById('render_holder'); | |
print(content); | |
document.body.removeChild(iframe); | |
}()) |
This file contains 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
function removeDuplicateCharacters(string) { | |
return string | |
.split('') | |
.filter(function(item, pos, self) { | |
return self.indexOf(item) == pos; | |
}) | |
.join(''); | |
} |
This file contains 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
function removeDuplicateCharacters(string) { | |
return string | |
.split('') | |
.filter(function(item, pos, self) { | |
return self.indexOf(item) == pos; | |
}) | |
.join(''); | |
} |
This file contains 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
// TODO | |
// @1 | |
// replace all `char === " "` to isNonAlnum(char) | |
// For tabs are allowed in text context, but not in command line. | |
// @2 | |
// consider special character `xxxx ----|` should not be transposed | |
// to `---- xxxx|` | |
// .split(/[^A-Za-z0-9]/) | |
String.prototype.backwardDeleteChar = function (curPos=0) { | |
if (curPos === 0 || !Number.isInteger(curPos)) return this + "" | |
return this.slice(0, curPos-1) + this.slice(curPos, this.length) | |
} | |
String.prototype.deleteChar = function (curPos=0) { | |
if (!Number.isInteger(curPos)) return this + "" | |
return this.slice(0, curPos) + this.slice(curPos+1, this.length) | |
} | |
function forwardChar(string, cursorPosition) { | |
return (cursorPosition < string.length) ? (cursorPosition + 1) : string.length; | |
} | |
function backwardChar(string, cursorPosition) { | |
return (cursorPosition > 0) ? (cursorPosition - 1) : 0; | |
} | |
// Ctrl + a | |
function beginningOfLine() { | |
return 0; | |
} | |
// Ctrl + e | |
function endOfLine(string) { | |
return string.length; | |
} | |
// Ctrl + t | |
function transposeChars(string, cursorPosition) { | |
let newString = string, newCursorPosition = cursorPosition; | |
let len = string.length; | |
if (len > 1 && cursorPosition > 0) { | |
// Note: When cursorPosition equals to len, the effect is the | |
// same as it being equivalent to len-1 | |
if (cursorPosition === len) cursorPosition = len - 1; | |
newString = string.slice(0, cursorPosition-1) | |
.concat(string[cursorPosition]) | |
.concat(string[cursorPosition-1]) | |
.concat(string.slice(cursorPosition+1)); | |
newCursorPosition = cursorPosition + 1; | |
} | |
return { | |
newString, | |
newCursorPosition | |
} | |
} | |
// Ctrl + k | |
function killLine(string, cursorPosition) { | |
return { | |
newCursorPosition: cursorPostion, | |
newString: string.slice(0, cursorPosition) | |
} | |
} | |
// Ctrl + u | |
function unixLineDiscard(string, cursorPosition) { | |
return { | |
newCursorPosition: 0, | |
newString: string.slice(cursorPosition, string.length) | |
} | |
} | |
// Alt + r | |
function revertLine(string, cursorPosition) { | |
return { | |
newCursorPosition: 0, | |
newString: "" | |
} | |
} | |
// helper function | |
function isOutRange(string, pos) { | |
return (pos < 0 || pos > string.length) | |
} | |
function splitByPosition(string, pos=0) { | |
if (isOutRange(string, pos)) throw new Error(`bad positon: ${pos}`); | |
return { | |
leftPart: string.slice(0, pos), | |
rightPart: string.slice(pos, string.length), | |
} | |
} | |
function caseTransform(string, curPos, toWhatCase) { | |
let {leftPart, rightPart} = splitByPosition(string, curPos); | |
let segments = rightPart.split(" "); | |
if (segments[0] !== "") { | |
segments[0] = toWhatCase.call(segments[0]); | |
} else if (segments.length > 1) { | |
// If the current position is a sparator space, then we try | |
// the next word if exist | |
segments[1] =toWhatCase.call( segments[1]); | |
} | |
return `${leftPart}${segments.join(" ")}` | |
} | |
String.prototype.downcaseWord = function (curPos) { | |
return caseTransform(this, curPos, String.prototype.toLowerCase) | |
} | |
String.prototype.upcaseWord = function (curPos) { | |
return caseTransform(this, curPos, String.prototype.toUpperCase) | |
} | |
String.prototype.capitalizeWord = function (curPos) { | |
function capitalize(string="") { | |
if (string === "") return string | |
return string[0].toUpperCase() + string.slice(1) | |
} | |
return caseTransform(this, curPos, capitalize) | |
} | |
// Alt + b | |
String.prototype.backwardWord = function (cursorPosition) { | |
let {leftPart} = splitByPosition(this, cursorPosition); | |
let leftSegments = leftPart.split(/[^A-Za-z0-9]/); | |
let newCursorPosition = cursorPosition; | |
for (let i=leftSegments.length-1; i>=0; i--) { | |
if (leftSegments[i] === "") { | |
newCursorPosition--; | |
} else { | |
newCursorPosition -= leftSegments[i].length; | |
break; | |
} | |
} | |
// Note: when the leftSegments is all non-word characters, the number of `""` | |
// is N+1, which N is the number of all non-word characters in leftSegments. | |
// Thus we fix this by setting newCursorPosition to 0 | |
return (newCursorPosition !== -1) ? newCursorPosition : 0; | |
} | |
// Alt + f | |
String.prototype.forwardWord = function (cursorPosition) { | |
let {rightPart} = splitByPosition(this, cursorPosition); | |
// Note: here we don't use \W, which is equivalent to [^A-Za-z0-9_], | |
// because the `_` is treated as non-word character | |
// @example xxx | yyyy_zzzzz --> xxx yyyy_(|)zzzzz | |
let rightSegments = rightPart.split(/[^A-Za-z0-9]/); | |
let newCursorPosition = cursorPosition; | |
let len = rightSegments.length; | |
for (let i=0; i<len; i++) { | |
if (rightSegments[i] === "") { | |
newCursorPosition++; | |
} else { | |
newCursorPosition += rightSegments[i].length; | |
break; | |
} | |
} | |
return newCursorPosition; | |
} | |
function isCharAtWordEnd(string, charPos) { | |
if (isOutRange(string, pos)) throw new Error(`bad positon: ${charPos}`); | |
if (charPos === string.length-1) return true | |
return string[charPos+1] === " " | |
} | |
function isCharAtWordBegin(string, charPos) { | |
if (isOutRange(string, charPos)) throw new Error(`bad positon: ${charPos}`); | |
if (charPos === 0) return true | |
return string[charPos-1] === " " | |
} | |
Array.prototype.countRepeatTimesFor = function (something) { | |
let times = 0 | |
this.forEach((item) => { | |
if (item === something) times++; | |
}) | |
return times; | |
} | |
// seperator | |
string.split(/\W/) | |
string.split(/\s/) ctrl+w | |
function findWordIndex(array, searchDirection="ltr") { | |
if (searchDirection === "rtl") { | |
array = array.reverse(); | |
} | |
index = array.findIndex((item) => { | |
return !(item === "") | |
}) | |
if (searchDirection === "rtl") { | |
array = array.reverse(); | |
index = (index === -1) ? index : array.length - index - 1; | |
} | |
return index; | |
} | |
String.prototype.transposeWords = function (curPos) { | |
let {leftPart, rightPart} = splitByPosition(string, curPos); | |
let leftSegments = leftPart.split(" "); | |
let rightSegments = rightPart.split(" "); | |
let pos = curPos; | |
let firstWord=secondWord=spacesInBetweenWors=""; | |
let mode; | |
// Explanation: In the following example, `xxxx` represents a four-character-long word, | |
// and so does the `yyyyy`, and `|` represents a cursor, `y(|)` represents that the two | |
// characters `y` and `|` are at the same position | |
// If the charater at pos is space, then we should search forward | |
// for our firstword | |
if (string[pos] === " ") { | |
if (pos < this.length) { | |
let len = rightSegments.length; | |
for (let i=0; i<len; i++) { | |
if (rightSegments[i] === "") { | |
spacesInBetweenWors += " "; | |
pos++; | |
} else { | |
// @example: xxxx | yyyyy --->yyyyy xxxx| | |
firstWord = rightSegments[i]; | |
break; | |
} | |
} | |
// There is no the right, no change | |
if (firstWord === "") return curPos; | |
mode = 1; | |
} else { | |
// @example: xxxx yyyyy| --->yyyyy xxxx| | |
firstWord = leftSegments[leftSegments.length-1]; | |
mode = 2; | |
} | |
} else { | |
// Given a non-space charater, if it is not at the begin of word, | |
// then the remaining must be the last element of the leftSegments | |
if (!isCharAtWordBegin(this, pos)) { | |
// @example: xxxx yy(|)yyy| --->yyyyy xxxx| | |
firstWord = leftSegments[leftSegments.length-1] + rightSegments[0]; | |
mode = 3; | |
} else { | |
// @example: xxxx y(|)yyyy| --->yyyyy xxxx| | |
firstWord = rightSegments[0]; | |
mode = 4; | |
} | |
} | |
let len = rightSegments.length; | |
for (let i=0; i<len; i++) { | |
if (rightSegments[i] === "") { | |
pos++; | |
} else { | |
pos += rightSegments[i].length; | |
break; | |
} | |
} | |
return pos; | |
} | |
// ctrl + w | |
String.prototype.unixWordRubout = function (cursorPosition) { | |
let {leftPart, rightPart} = splitByPosition(string, cursorPosition); | |
let leftSegments = leftPart.split(/\s/); | |
let index = findWordIndex(leftSegments, "rtl"); | |
let newCursorPosition = cursorPosition, newString = this + ""; | |
if (index !== -1) { | |
// @example xxx yyyy z(|)zzzz ---> xxx z(|)zzzz, here wordLength is 4 | |
// skippedWhiteSpaces equals to 3, so the newCursorPosition is result of | |
// the cursorPosition moving 7(3+4) characters backwards | |
let wordLength = leftSegments[index].length; | |
let skippedWhiteSpaces = (leftSegments.length-1) - index; | |
newCursorPosition = cursorPosition - (wordLength + skippedWhiteSpaces); | |
newString = string.slice(0, newCursorPosition) + string.slice(cursorPosition); | |
} | |
return { | |
newCursorPosition, | |
newString | |
} | |
} | |
// Alt + d | |
String.prototype.killWord = function (cursorPosition) { | |
let {leftPart, rightPart} = splitByPosition(string, cursorPosition); | |
let rightSegments = rightPart.split(/[^A-Za-z0-9]/); | |
let index = findWordIndex(rightSegments); | |
let newCursorPosition = cursorPosition, newString = this + ""; | |
if (index !== -1) { | |
let wordLength = rightSegments[index].length; | |
let skippedWhiteSpaces = index; | |
let movePosition = cursorPosition + (wordLength + skippedWhiteSpaces); | |
newString = string.slice(0, cursorPosition) + string.slice(movePosition); | |
} | |
return { | |
newCursorPosition, | |
newString | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment