Skip to content

Instantly share code, notes, and snippets.

@evilpilaf
Last active June 27, 2022 15:07
Show Gist options
  • Save evilpilaf/5a9a22fcc01e68556daacfcb5f207165 to your computer and use it in GitHub Desktop.
Save evilpilaf/5a9a22fcc01e68556daacfcb5f207165 to your computer and use it in GitHub Desktop.
vscode setup
import * as vscode from 'vscode';
import { initUsePackage, usePackage, configSet } from 'vscode-use-package';
import * as js from './js';
export function init(context: vscode.ExtensionContext) {
initUsePackage(context);
configSet('workbench', {
'editor.showTabs': true,
'editor.enablePreview': false,
'activityBar.visible': true,
});
configSet('editor', {
fontFamily: 'Fira Code',
'editor.fontLigatures': true,
tabSize: 4,
'minimap.enabled': false,
detectIndentation: false,
cursorStyle: 'block',
wordWrap: 'bounded',
wordWrapColumn: 100,
renderLineHighlight: 'gutter',
codeLens: false,
formatOnSave: true,
formatOnPaste: true,
formatOnType: true,
quickSuggestions: { other: false, comments: false, strings: false },
'suggest.shareSuggestSelections': true,
'suggest.localityBonus': true,
});
configSet('terminal.integrated', {
'shell.windows': '${env:USERPROFILE}\\.dotnet\\tools\\pwsh.exe',
'shell.linux': '/usr/bin/fish',
'fontFamily': 'FuraCode NF, Fira Code',
commandsToSkipShell: [
'workbench.action.togglePanel',
'workbench.action.terminal.toggleTerminal',
'workbench.action.showCommands',
],
});
configSet({
'explorer.openEditors.visible': 0,
'files.autoSave': 'onFocusChange',
'files.trimFinalNewlines': true,
'files.trimTrailingWhitespace': true,
'git.autofetch': true,
});
usePackage('jack-pallot.atom-dark-syntax', {
scope: 'workbench',
config: { colorTheme: 'Atom Dark Syntax' },
});
usePackage('pkief.material-icon-theme', {
config: { activeIconPack: 'react_redux', hidesExplorerArrows: true },
init: () => configSet('workbench', { iconTheme: 'material-icon-theme' }),
});
usePackage('eamodio.gitlens', {
config: {
'currentLine.enabled': false,
},
});
usePackage('hbenl.vscode-test-explorer', {
scope: 'testExplorer',
config: {
mergeSuites: true,
addToEditorContextMenu: true,
showExpandButton: 0,
showCollapseButton: false,
sort: 'byLocation',
},
keymap: [
{
key: 'ctrl+c ctrl+l',
command: 'test-explorer.show-log',
},
{
key: 'ctrl+c t',
command: 'test-explorer.run-all',
},
],
});
usePackage('connorshea.vscode-test-explorer-status-bar');
usePackage('aaron-bond.better-comments', {
config: {
highlightPlainText: true,
tags: [
{
tag: '/',
color: '#609860',
strikethrough: false,
backgroundColor: 'transparent',
},
{
tag: '!',
color: '#10a810',
strikethrough: false,
backgroundColor: 'transparent',
},
],
},
});
usePackage('ionide.ionide-fsharp', {
globalConfig: {
"FSharp.enableTouchBar": false,
"FSharp.showExplorerOnStartup": false,
},
});
usePackage('github.vscode-pull-request-github');
usePackage('gruntfuggly.todo-tree');
usePackage('ms-vscode.vscode-typescript-tslint-plugin');
usePackage('humao.rest-client');
usePackage('ms-dotnettools.csharp', {
globalConfig: {
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableRoslynAnalyzers": true,
},
});
usePackage('editorconfig.editorconfig');
js.init();
}
import { usePackage } from 'vscode-use-package';
export function init() {
usePackage('esbenp.prettier-vscode', {
scope: 'prettier',
config: {
trailingComma: 'es5',
'prettier.singleQuote': true,
},
});
}
import { usePackage, keymapSet } from "vscode-use-package";
export function init() {
usePackage("kaiwood.center-editor-window", { config: { threeStateToggle: true } });
usePackage("garaemon.vscode-emacs-tab", {
scope: "emacs-tab",
keymap: [
{
key: "tab",
command: "emacs-tab.reindentCurrentLine",
when: "editorTextFocus",
},
],
});
usePackage("ow.vscode-subword-navigation", {
scope: "subwordNavigation",
keymap: [
{
key: "ctrl+left",
command: "subwordNavigation.cursorSubwordLeft",
when: "editorTextFocus",
},
{
key: "alt+left",
command: "-subwordNavigation.cursorSubwordLeft",
when: "editorTextFocus",
},
{
key: "ctrl+shift+left",
command: "subwordNavigation.cursorSubwordLeftSelect",
when: "editorTextFocus",
},
{
key: "shift+alt+left",
command: "-subwordNavigation.cursorSubwordLeftSelect",
when: "editorTextFocus",
},
{
key: "ctrl+right",
command: "subwordNavigation.cursorSubwordRight",
when: "editorTextFocus",
},
{
key: "alt+right",
command: "-subwordNavigation.cursorSubwordRight",
when: "editorTextFocus",
},
{
key: "ctrl+shift+right",
command: "subwordNavigation.cursorSubwordRightSelect",
when: "editorTextFocus",
},
{
key: "shift+alt+right",
command: "-subwordNavigation.cursorSubwordRightSelect",
when: "editorTextFocus",
},
{
key: "ctrl+backspace",
command: "subwordNavigation.deleteSubwordLeft",
when: "editorTextFocus && !editorReadonly",
},
{
key: "alt+backspace",
command: "-subwordNavigation.deleteSubwordLeft",
when: "editorTextFocus && !editorReadonly",
},
{
key: "ctrl+delete",
command: "subwordNavigation.deleteSubwordRight",
when: "editorTextFocus && !editorReadonly",
},
{
key: "alt+delete",
command: "-subwordNavigation.deleteSubwordRight",
when: "editorTextFocus && !editorReadonly",
},
{
key: "ctrl+left",
command: "-cursorWordStartLeft",
when: "textInputFocus",
},
{
key: "ctrl+shift+left",
command: "-cursorWordStartLeftSelect",
when: "textInputFocus",
},
{
key: "ctrl+right",
command: "-cursorWordEndRight",
when: "textInputFocus",
},
{
key: "ctrl+shift+right",
command: "-cursorWordEndRightSelect",
when: "textInputFocus",
},
{
key: "ctrl+delete",
command: "-deleteWordRight",
when: "textInputFocus && !editorReadonly",
},
{
key: "ctrl+backspace",
command: "-deleteWordLeft",
when: "textInputFocus && !editorReadonly",
},
],
});
keymapSet([
{
key: "ctrl+x ctrl+f",
command: "extension.codeFileNav",
},
{
key: "ctrl+c ctrl+s",
command: "workbench.action.tasks.test",
},
{
key: "ctrl+c ctrl+t",
command: "workbench.action.tasks.runTask",
},
{
key: "ctrl+c ctrl+b",
command: "workbench.action.tasks.build",
},
{
key: "ctrl+shift+b",
command: "-workbench.action.tasks.build",
},
{
key: "ctrl+x ctrl+e",
command: "workbench.action.terminal.toggleTerminal",
},
{
key: "ctrl+`",
command: "-workbench.action.terminal.toggleTerminal",
},
{
key: "ctrl+x ctrl+c",
command: "workbench.action.quit",
},
{
key: "ctrl+shift+-",
command: "undo",
when: "editorTextFocus && !editorReadonly",
},
{
key: "ctrl+z",
command: "-undo",
when: "editorTextFocus && !editorReadonly",
},
{
key: "ctrl+=",
command: "editor.action.smartSelect.grow",
when: "editorTextFocus",
},
{
key: "ctrl+alt+=",
command: "-editor.action.smartSelect.grow",
when: "editorTextFocus",
},
{
key: "alt+shift+.",
command: "type",
args: {
text: "->",
},
when: "editorTextFocus",
},
{
key: "ctrl+alt+shift-.",
command: "type",
args: {
text: "=>",
},
when: "editorTextFocus",
},
{
key: "tab",
command: "emacs-tab.reindentCurrentLine",
when: "editorTextFocus",
},
{
key: "alt+n",
command: "editor.action.marker.next",
},
{
key: "alt+g n",
command: "-editor.action.marker.next",
},
{
key: "alt+p",
command: "editor.action.marker.prev",
},
{
key: "alt+g p",
command: "-editor.action.marker.prev",
},
{
key: "alt+.",
command: "editor.action.goToDeclaration",
when: "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor",
},
{
key: "f12",
command: "-editor.action.goToDeclaration",
when: "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor",
},
{
key: "alt+,",
command: "workbench.action.navigateBack",
},
{
key: "alt+left",
command: "-workbench.action.navigateBack",
},
{
key: "ctrl+x ctrl+s",
command: "workbench.action.files.save",
},
{
key: "ctrl+s",
command: "-workbench.action.files.save",
},
{
key: "ctrl+x ctrl+w",
command: "workbench.action.files.saveAs",
},
{
key: "ctrl+shift+s",
command: "-workbench.action.files.saveAs",
},
{
key: "ctrl+x alt+s",
command: "workbench.action.files.saveLocalFile",
when: "remoteFileDialogVisible",
},
{
key: "ctrl+shift+s",
command: "-workbench.action.files.saveLocalFile",
when: "remoteFileDialogVisible",
},
{
key: "ctrl+x s",
command: "workbench.action.files.saveAll",
},
{
key: "ctrl+k s",
command: "-workbench.action.files.saveAll",
},
{
key: "ctrl+k ctrl+shift+s",
command: "-workbench.action.files.saveWithoutFormatting",
},
{
key: "ctrl+k d",
command: "-workbench.files.action.compareWithSaved",
},
{
key: "ctrl+o",
command: "-workbench.action.files.openFile",
},
{
key: "ctrl+x ctrl+p",
command: "workbench.action.files.openFolder",
},
{
key: "ctrl+k ctrl+o",
command: "-workbench.action.files.openFolder",
},
{
key: "alt+f8",
command: "-editor.action.marker.next",
when: "editorTextFocus && !editorReadonly",
},
{
key: "f8",
command: "-editor.action.marker.nextInFiles",
when: "editorFocus && !editorReadonly",
},
{
key: "shift+alt+f8",
command: "-editor.action.marker.prev",
when: "editorTextFocus && !editorReadonly",
},
{
key: "shift+f8",
command: "-editor.action.marker.prevInFiles",
when: "editorFocus && !editorReadonly",
},
{
key: "ctrl+c l",
command: "workbench.actions.view.problems",
},
{
key: "ctrl+shift+m",
command: "-workbench.actions.view.problems",
},
{
key: "alt+w",
command: "editor.action.clipboardCopyAction",
when: "textInputFocus",
},
{
key: "ctrl+c",
command: "-editor.action.clipboardCopyAction",
when: "textInputFocus",
},
{
key: "ctrl+insert",
command: "-editor.action.clipboardCopyAction",
when: "textInputFocus",
},
{
key: "alt+w",
command: "workbench.action.terminal.copySelection",
when: "terminalFocus && terminalTextSelected",
},
{
key: "ctrl+c",
command: "-workbench.action.terminal.copySelection",
when: "terminalFocus && terminalTextSelected",
},
{
key: "ctrl+x k",
command: "workbench.action.closeActiveEditor",
},
{
key: "ctrl+w",
command: "-workbench.action.closeActiveEditor",
},
{
key: "ctrl+w",
command: "-workbench.action.closeGroup",
when: "activeEditorGroupEmpty && multipleEditorGroups",
},
{
key: "ctrl+w",
command: "-workbench.action.closeWindow",
when: "!editorIsOpen && !multipleEditorGroups",
},
{
key: "ctrl+k",
command: "deleteAllRight",
},
{
key: "ctrl+w",
command: "editor.action.clipboardCutAction",
when: "textInputFocus && !editorReadonly",
},
{
key: "ctrl+x",
command: "-editor.action.clipboardCutAction",
when: "textInputFocus && !editorReadonly",
},
{
key: "ctrl+y",
command: "editor.action.clipboardPasteAction",
when: "textInputFocus && !editorReadonly",
},
{
key: "ctrl+v",
command: "-editor.action.clipboardPasteAction",
when: "textInputFocus && !editorReadonly",
},
{
key: "ctrl+oem_minus",
command: "workbench.action.zoomOut",
},
{
key: "ctrl+shift+oem_minus",
command: "-workbench.action.zoomOut",
},
{
key: "ctrl+y",
command: "-redo",
when: "textInputFocus && !editorReadonly",
},
{
key: "ctrl+tab",
command: "workbench.action.openNextRecentlyUsedEditorInGroup",
},
{
key: "ctrl+tab",
command: "-workbench.action.openNextRecentlyUsedEditorInGroup",
},
{
key: "ctrl+x o",
command: "workbench.action.terminal.focusNextPane",
when: "terminalFocus",
},
{
key: "alt+right",
command: "-workbench.action.terminal.focusNextPane",
when: "terminalFocus",
},
{
key: "alt+down",
command: "-workbench.action.terminal.focusNextPane",
when: "terminalFocus",
},
{
key: "ctrl+x e",
command: "workbench.action.togglePanel",
},
{
key: "ctrl+j",
command: "-workbench.action.togglePanel",
},
{
key: "ctrl+x 1",
command: "workbench.action.editorLayoutSingle",
},
{
key: "ctrl+x ctrl+o",
command: "workbench.action.focusNextGroup",
},
{
key: "alt+g alt+g",
command: "workbench.action.gotoLine",
},
{
key: "ctrl+g",
command: "-workbench.action.gotoLine",
},
{
key: "ctrl+g",
command: "cancelSelection",
when: "editorHasSelection && textInputFocus",
},
{
key: "shift+escape",
command: "-cancelSelection",
when: "editorHasSelection && textInputFocus",
},
{
key: "ctrl+g",
command: "cancelRenameInput",
when: "editorFocus && renameInputVisible",
},
{
key: "shift+escape",
command: "-cancelRenameInput",
when: "editorFocus && renameInputVisible",
},
{
key: "ctrl+g",
command: "editor.cancelOperation",
when: "cancellableOperation",
},
{
key: "escape",
command: "-editor.cancelOperation",
when: "cancellableOperation",
},
{
key: "ctrl+g",
command: "editor.gotoNextSymbolFromResult.cancel",
when: "hasSymbols",
},
{
key: "escape",
command: "-editor.gotoNextSymbolFromResult.cancel",
when: "hasSymbols",
},
{
key: "ctrl+g",
command: "filesExplorer.cancelCut",
when:
"explorerResourceCut && explorerViewletVisible && filesExplorerFocus && !inputFocus",
},
{
key: "escape",
command: "-filesExplorer.cancelCut",
when:
"explorerResourceCut && explorerViewletVisible && filesExplorerFocus && !inputFocus",
},
{
key: "ctrl+g",
command: "search.action.cancel",
when: "listFocus && searchViewletVisible && !inputFocus",
},
{
key: "escape",
command: "-search.action.cancel",
when: "listFocus && searchViewletVisible && !inputFocus",
},
{
key: "ctrl+g",
command: "closeReferenceSearch",
when: "referenceSearchVisible && !config.editor.stablePeek",
},
{
key: "shift+escape",
command: "-closeReferenceSearch",
when: "referenceSearchVisible && !config.editor.stablePeek",
},
{
key: "ctrl+g",
command: "closeReferenceSearchEditor",
when: "inReferenceSearchEditor && !config.editor.stablePeek",
},
{
key: "shift+escape",
command: "-closeReferenceSearchEditor",
when: "inReferenceSearchEditor && !config.editor.stablePeek",
},
{
key: "ctrl+s",
command: "actions.find",
},
{
key: "ctrl+f",
command: "-actions.find",
},
{
key: "ctrl+shift+5",
command: "editor.action.startFindReplaceAction",
},
{
key: "ctrl+h",
command: "-editor.action.startFindReplaceAction",
},
{
key: "ctrl+g",
command: "workbench.action.hideInterfaceOverview",
when: "interfaceOverviewVisible",
},
{
key: "escape",
command: "-workbench.action.hideInterfaceOverview",
when: "interfaceOverviewVisible",
},
{
key: "ctrl+g",
command: "workbench.action.terminal.clearSelection",
when: "terminalFocus && terminalTextSelected && !terminalFindWidgetVisible",
},
{
key: "escape",
command: "-workbench.action.terminal.clearSelection",
when: "terminalFocus && terminalTextSelected && !terminalFindWidgetVisible",
},
{
key: "ctrl+g",
command: "workbench.action.terminal.hideFindWidget",
when: "terminalFindWidgetVisible && terminalFocus",
},
{
key: "shift+escape",
command: "-workbench.action.terminal.hideFindWidget",
when: "terminalFindWidgetVisible && terminalFocus",
},
{
key: "escape",
command: "-cancelRenameInput",
when: "editorFocus && renameInputVisible",
},
{
key: "ctrl+g",
command: "closeAccessibilityHelp",
when: "accessibilityHelpWidgetVisible && editorFocus",
},
{
key: "shift+escape",
command: "-closeAccessibilityHelp",
when: "accessibilityHelpWidgetVisible && editorFocus",
},
{
key: "ctrl+g",
command: "closeBreakpointWidget",
when: "breakpointWidgetVisible && textInputFocus",
},
{
key: "shift+escape",
command: "-closeBreakpointWidget",
when: "breakpointWidgetVisible && textInputFocus",
},
{
key: "ctrl+g",
command: "closeDirtyDiff",
when: "dirtyDiffVisible",
},
{
key: "shift+escape",
command: "-closeDirtyDiff",
when: "dirtyDiffVisible",
},
{
key: "ctrl+g",
command: "closeFindWidget",
when: "editorFocus && findWidgetVisible",
},
{
key: "shift+escape",
command: "-closeFindWidget",
when: "editorFocus && findWidgetVisible",
},
{
key: "ctrl+g",
command: "closeMarkersNavigation",
when: "editorFocus && markersNavigationVisible",
},
{
key: "shift+escape",
command: "-closeMarkersNavigation",
when: "editorFocus && markersNavigationVisible",
},
{
key: "ctrl+g",
command: "closeParameterHints",
when: "editorFocus && parameterHintsVisible",
},
{
key: "shift+escape",
command: "-closeParameterHints",
when: "editorFocus && parameterHintsVisible",
},
{
key: "escape",
command: "-closeReferenceSearch",
when: "referenceSearchVisible && !config.editor.stablePeek",
},
{
key: "escape",
command: "-closeReferenceSearchEditor",
when: "inReferenceSearchEditor && !config.editor.stablePeek",
},
{
key: "ctrl+g",
command: "closeReplaceInFilesWidget",
when: "replaceInputBoxFocus && searchViewletVisible",
},
{
key: "escape",
command: "-closeReplaceInFilesWidget",
when: "replaceInputBoxFocus && searchViewletVisible",
},
{
key: "ctrl+g",
command: "editor.action.webvieweditor.hideFind",
when: "webviewFindWidgetVisible && !editorFocus && activeEditor == 'WebviewEditor'",
},
{
key: "escape",
command: "-editor.action.webvieweditor.hideFind",
when: "webviewFindWidgetVisible && !editorFocus && activeEditor == 'WebviewEditor'",
},
{
key: "ctrl+g",
command: "editor.closeCallHierarchy",
when: "callHierarchyVisible && !config.editor.stablePeek",
},
{
key: "escape",
command: "-editor.closeCallHierarchy",
when: "callHierarchyVisible && !config.editor.stablePeek",
},
{
key: "ctrl+g",
command: "hideSuggestWidget",
when: "suggestWidgetVisible && textInputFocus",
},
{
key: "shift+escape",
command: "-hideSuggestWidget",
when: "suggestWidgetVisible && textInputFocus",
},
{
key: "ctrl+g",
command: "keybindings.editor.clearSearchResults",
when: "inKeybindings && inKeybindingsSearch",
},
{
key: "escape",
command: "-keybindings.editor.clearSearchResults",
when: "inKeybindings && inKeybindingsSearch",
},
{
key: "ctrl+g",
command: "leaveSnippet",
when: "editorTextFocus && inSnippetMode",
},
{
key: "escape",
command: "-leaveSnippet",
when: "editorTextFocus && inSnippetMode",
},
{
key: "shift+escape",
command: "-leaveSnippet",
when: "editorTextFocus && inSnippetMode",
},
{
key: "ctrl+g",
command: "list.clear",
when: "listFocus && listHasSelectionOrFocus && !inputFocus",
},
{
key: "escape",
command: "-list.clear",
when: "listFocus && listHasSelectionOrFocus && !inputFocus",
},
{
key: "ctrl+g",
command: "notifications.hideList",
when: "notificationCenterVisible",
},
{
key: "escape",
command: "-notifications.hideList",
when: "notificationCenterVisible",
},
{
key: "ctrl+g",
command: "notifications.hideToasts",
when: "notificationToastsVisible",
},
{
key: "escape",
command: "-notifications.hideToasts",
when: "notificationToastsVisible",
},
{
key: "ctrl+g",
command: "removeSecondaryCursors",
when: "editorHasMultipleSelections && textInputFocus",
},
{
key: "shift+escape",
command: "-removeSecondaryCursors",
when: "editorHasMultipleSelections && textInputFocus",
},
{
key: "ctrl+g",
command: "settings.action.clearSearchResults",
when: "inSettingsSearch",
},
{
key: "escape",
command: "-settings.action.clearSearchResults",
when: "inSettingsSearch",
},
{
key: "ctrl+g",
command: "workbench.action.closeQuickOpen",
when: "inQuickOpen",
},
{
key: "shift+escape",
command: "-workbench.action.closeQuickOpen",
when: "inQuickOpen",
},
{
key: "ctrl+g",
command: "workbench.action.hideComment",
when: "commentEditorFocused",
},
{
key: "shift+escape",
command: "-workbench.action.hideComment",
when: "commentEditorFocused",
},
{
key: "ctrl+b",
command: "-workbench.action.toggleSidebarVisibility",
},
{
key: "alt+x",
command: "workbench.action.showCommands",
},
{
key: "ctrl+shift+p",
command: "-workbench.action.showCommands",
},
{
key: "ctrl+x ctrl+t",
command: "workbench.action.showAllSymbols",
},
{
key: "ctrl+t",
command: "-workbench.action.showAllSymbols",
},
{
key: "ctrl+t",
command: "workbench.action.gotoSymbol",
},
{
key: "ctrl+shift+o",
command: "-workbench.action.gotoSymbol",
},
{
key: "ctrl+x ctrl+r",
command: "editor.action.rename",
when: "editorHasRenameProvider && editorTextFocus && !editorReadonly",
},
{
key: "f2",
command: "-editor.action.rename",
when: "editorHasRenameProvider && editorTextFocus && !editorReadonly",
},
{
key: "ctrl+x ctrl+b",
command: "workbench.action.quickOpen",
},
{
key: "ctrl+p",
command: "-workbench.action.quickOpen",
},
{
key: "ctrl+alt+.",
command: "editor.action.peekDefinition",
when:
"editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor",
},
{
key: "alt+f12",
command: "-editor.action.peekDefinition",
when:
"editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor",
},
{
key: "ctrl+s",
command: "settings.action.search",
when: "inSettingsEditor",
},
{
key: "ctrl+f",
command: "-settings.action.search",
when: "inSettingsEditor",
},
{
key: "ctrl+x f",
command: "workbench.view.explorer",
},
{
key: "ctrl+shift+e",
command: "-workbench.view.explorer",
},
{
key: "ctrl+shift+g",
command: "-workbench.view.scm",
},
{
key: "ctrl+x g",
command: "workbench.view.scm",
},
{
key: "ctrl+s",
command: "workbench.action.terminal.focusFindWidget",
when: "terminalFocus",
},
{
key: "ctrl+f",
command: "-workbench.action.terminal.focusFindWidget",
when: "terminalFocus",
},
{
key: "ctrl+s",
command: "workbench.action.terminal.focusFindWidget",
when: "terminalFindWidgetFocused",
},
{
key: "ctrl+f",
command: "-workbench.action.terminal.focusFindWidget",
when: "terminalFindWidgetFocused",
},
{
key: "ctrl+c ctrl+l",
command: "test-explorer.show-log",
},
{
key: "ctrl+c t",
command: "test-explorer.run-all",
},
{
key: "ctrl+s",
command: "keybindings.editor.searchKeybindings",
when: "inKeybindings",
},
{
key: "ctrl+f",
command: "-keybindings.editor.searchKeybindings",
when: "inKeybindings",
},
{
key: "ctrl+c ctrl+f",
command: "editor.action.formatDocument",
when:
"editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly",
},
{
key: "shift+alt+f",
command: "-editor.action.formatDocument",
when:
"editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly",
},
{
key: "ctrl+\\",
command: "editor.action.triggerSuggest",
when: "editorHasCompletionItemProvider && textInputFocus && !editorReadonly",
},
{
key: "ctrl+space",
command: "-editor.action.triggerSuggest",
when: "editorHasCompletionItemProvider && textInputFocus && !editorReadonly",
},
{
key: "ctrl+\\",
command: "-workbench.action.splitEditor",
},
{
key: "ctrl+x 2",
command: "workbench.action.splitEditorOrthogonal",
},
{
key: "ctrl+k ctrl+\\",
command: "-workbench.action.splitEditorOrthogonal",
},
{
key: "ctrl+x 3",
command: "workbench.action.splitEditor",
},
{
key: "ctrl+k w",
command: "-workbench.action.closeEditorsInGroup",
},
{
key: "ctrl+x alt+k",
command: "workbench.action.closeUnmodifiedEditors",
},
{
key: "ctrl+k u",
command: "-workbench.action.closeUnmodifiedEditors",
},
{
key: "ctrl+x 0",
command: "workbench.action.closeEditorsAndGroup",
},
{
key: "ctrl+x left",
command: "workbench.action.focusLeftGroup",
},
{
key: "ctrl+k ctrl+left",
command: "-workbench.action.focusLeftGroup",
},
{
key: "ctrl+x right",
command: "workbench.action.focusRightGroup",
},
{
key: "ctrl+k ctrl+right",
command: "-workbench.action.focusRightGroup",
},
{
key: "ctrl+x up",
command: "workbench.action.focusAboveGroup",
},
{
key: "ctrl+k ctrl+up",
command: "-workbench.action.focusAboveGroup",
},
{
key: "ctrl+x down",
command: "workbench.action.focusBelowGroup",
},
{
key: "ctrl+k ctrl+down",
command: "-workbench.action.focusBelowGroup",
},
{
key: "ctrl+x b",
command: "workbench.action.quickOpenPreviousEditor",
},
{
key: "ctrl+x o",
command: "workbench.action.navigateEditorGroups",
},
{
key: "ctrl+alt+'",
command: "editor.action.selectHighlights",
when: "editorFocus",
},
{
key: "ctrl+shift+l",
command: "-editor.action.selectHighlights",
when: "editorFocus",
},
{
key: "ctrl+'",
command: "editor.action.addSelectionToNextFindMatch",
when: "editorFocus",
},
{
key: "ctrl+d",
command: "-editor.action.addSelectionToNextFindMatch",
when: "editorFocus",
},
{
key: "ctrl+shift+'",
command: "editor.action.addSelectionToPreviousFindMatch",
},
{
key: "ctrl+u ctrl+'",
command: "editor.action.moveSelectionToNextFindMatch",
when: "editorFocus",
},
{
key: "ctrl+k ctrl+d",
command: "-editor.action.moveSelectionToNextFindMatch",
when: "editorFocus",
},
{
key: "ctrl+u ctrl+shift+'",
command: "editor.action.moveSelectionToPreviousFindMatch",
},
{
key: "ctrl+e",
command: "-workbench.action.quickOpen",
},
{
key: "ctrl+e",
command: "-workbench.action.quickOpenNavigateNextInFilePicker",
when: "inFilesPicker && inQuickOpen",
},
{
key: "ctrl+shift+e",
command: "-workbench.action.quickOpenNavigatePreviousInFilePicker",
when: "inFilesPicker && inQuickOpen",
},
{
key: "alt+;",
command: "editor.action.commentLine",
when: "editorTextFocus && !editorReadonly",
},
{
key: "ctrl+shift+a",
command: "-editor.action.blockComment",
when: "editorTextFocus && !editorReadonly",
},
{
key: "ctrl+a",
command: "-editor.action.selectAll",
when: "textInputFocus",
},
{
key: "ctrl+a",
command: "-editor.action.webvieweditor.selectAll",
when: "!editorFocus && !inputFocus && activeEditor == 'WebviewEditor'",
},
{
key: "ctrl+a",
command: "cursorHome",
when: "textInputFocus",
},
{
key: "ctrl+e",
command: "cursorEnd",
when: "textInputFocus",
},
{
key: "alt+w",
command: "filesExplorer.copy",
when:
"explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus",
},
{
key: "ctrl+c",
command: "-filesExplorer.copy",
when:
"explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus",
},
{
key: "alt+w",
command: "keybindings.editor.copyKeybindingEntry",
when: "inKeybindings && keybindingFocus",
},
{
key: "ctrl+c",
command: "-keybindings.editor.copyKeybindingEntry",
when: "inKeybindings && keybindingFocus",
},
{
key: "alt+w",
command: "problems.action.copy",
when: "problemFocus",
},
{
key: "ctrl+c",
command: "-problems.action.copy",
when: "problemFocus",
},
{
key: "alt+w",
command: "search.action.copyMatch",
when: "fileMatchOrMatchFocus",
},
{
key: "ctrl+c",
command: "-search.action.copyMatch",
when: "fileMatchOrMatchFocus",
},
{
key: "ctrl+alt+c",
command: "-search.action.copyPath",
when: "fileMatchOrFolderMatchFocus",
},
{
key: "ctrl+alt+w",
command: "search.action.copyPath",
},
{
key: "ctrl+y",
command: "filesExplorer.paste",
when:
"explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus",
},
{
key: "ctrl+v",
command: "-filesExplorer.paste",
when:
"explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus",
},
{
key: "ctrl+w",
command: "filesExplorer.cut",
when:
"explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus",
},
{
key: "ctrl+x",
command: "-filesExplorer.cut",
when:
"explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus",
},
{
key: "ctrl+x t",
command: "workbench.action.toggleSidebarVisibility",
},
{
key: "ctrl+x f",
command: "-extension.dired.open",
when: "editorTextFocus && !inDebugRepl",
},
{
key: "ctrl+x p",
command: "workbench.action.openRecent",
},
{
key: "ctrl+r",
command: "-workbench.action.openRecent",
},
{
key: "ctrl+c d",
command: "workbench.action.debug.start",
when: "!inDebugMode",
},
{
key: "f5",
command: "-workbench.action.debug.start",
when: "!inDebugMode",
},
{
key: "ctrl+c d",
command: "workbench.action.debug.continue",
when: "inDebugMode",
},
{
key: "f5",
command: "-workbench.action.debug.continue",
when: "inDebugMode",
},
{
key: "ctrl+c r",
command: "workbench.action.debug.restart",
when: "inDebugMode",
},
{
key: "ctrl+shift+f5",
command: "-workbench.action.debug.restart",
when: "inDebugMode",
},
{
key: "ctrl+c s",
command: "workbench.action.debug.stop",
when: "inDebugMode",
},
{
key: "shift+f5",
command: "-workbench.action.debug.stop",
when: "inDebugMode",
},
{
key: "ctrl+c alt+d",
command: "workbench.action.debug.run",
when: "!inDebugMode",
},
{
key: "ctrl+f5",
command: "-workbench.action.debug.run",
when: "!inDebugMode",
},
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment