mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
392 lines
12 KiB
JSON
392 lines
12 KiB
JSON
// Place your key bindings in this file to override the defaults
|
|
[
|
|
{
|
|
"key": "ctrl+alt+b",
|
|
"command": "bookmarks.toggle",
|
|
"when": "editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+shift+t",
|
|
"command": "workbench.action.terminal.new"
|
|
},
|
|
{
|
|
"key": "ctrl+shift+alt+right",
|
|
"command": "editor.emmet.action.nextEditPoint",
|
|
"when": "editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+shift+alt+t",
|
|
"command": "editor.emmet.action.matchTag",
|
|
"when": "editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+shift+alt+p",
|
|
"command": "editor.emmet.action.wrapWithAbbreviation",
|
|
"when": "editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+t",
|
|
"command": "workbench.action.terminal.focus"
|
|
},
|
|
{
|
|
"key": "ctrl+t",
|
|
"command": "workbench.action.focusActiveEditorGroup",
|
|
"when": "terminalFocus"
|
|
},
|
|
{
|
|
"key": "alt+e",
|
|
"command": "workbench.action.focusActiveEditorGroup"
|
|
},
|
|
{
|
|
"key": "ctrl+alt+e",
|
|
"command": "python.execInTerminal"
|
|
},
|
|
{
|
|
"key": "ctrl+alt+n",
|
|
"command": "explorer.newFile"
|
|
},
|
|
{
|
|
"key": "ctrl+alt+g",
|
|
"command": "workbench.action.editor.nextChange"
|
|
},
|
|
{
|
|
"key": "ctrl+shift+j",
|
|
"command": "editor.action.joinLines",
|
|
"when": "editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+shift+j",
|
|
"command": "workbench.action.togglePanel"
|
|
},
|
|
{
|
|
"key": "shift+escape",
|
|
"command": "workbench.action.toggleSidebarVisibility"
|
|
},
|
|
{
|
|
"key": "shift+escape",
|
|
"command": "workbench.action.focusSideBar",
|
|
"when": "editorTextFocus"
|
|
},
|
|
{
|
|
"key": "shift+escape",
|
|
"command": "workbench.action.toggleSidebarVisibility",
|
|
"when": "editorFocus && sideBarVisible"
|
|
},
|
|
|
|
// vim.keybindings
|
|
// quick open navigation
|
|
{
|
|
"key": "ctrl+n",
|
|
"command": "workbench.action.quickOpenSelectNext",
|
|
"when": "inQuickOpen"
|
|
},
|
|
{
|
|
"key": "ctrl+p",
|
|
"command": "workbench.action.quickOpenSelectPrevious",
|
|
"when": "inQuickOpen"
|
|
},
|
|
{
|
|
"key": "ctrl+n",
|
|
"command": "extension.vim_ctrl+n",
|
|
"when": "editorTextFocus && vim.active && vim.use<C-n> && !inDebugRepl || vim.active && vim.use<C-n> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-n> && !inDebugRepl && vim.mode == 'SearchInProgressMode' && !inQuickOpen"
|
|
},
|
|
{
|
|
"key": "ctrl+p",
|
|
"command": "extension.vim_ctrl+p",
|
|
"when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode' && !inQuickOpen"
|
|
},
|
|
|
|
// sidebar
|
|
{
|
|
"key": "j",
|
|
"command": "list.focusAnyDown",
|
|
"when": "sideBarFocus && !inputFocus"
|
|
},
|
|
{
|
|
"key": "k",
|
|
"command": "list.focusAnyUp",
|
|
"when": "sideBarFocus && !inputFocus"
|
|
},
|
|
|
|
// Navigation
|
|
{
|
|
"key": "ctrl+h",
|
|
"command": "workbench.action.navigateLeft",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+l",
|
|
"command": "workbench.action.navigateRight",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+k",
|
|
"command": "workbench.action.navigateUp",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+j",
|
|
"command": "workbench.action.navigateDown",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space b l",
|
|
"command": "workbench.action.showAllEditors",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space b x",
|
|
"command": "workbench.action.closeActiveEditor",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "] b",
|
|
"command": "workbench.action.nextEditorInGroup",
|
|
"when": "(vim.mode == 'Normal' || vim.mode == 'Visual') && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "[ b",
|
|
"command": "workbench.action.previousEditorInGroup",
|
|
"when": "(vim.mode == 'Normal' || vim.mode == 'Visual') && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space e",
|
|
"command": "runCommands",
|
|
"args": {
|
|
"commands": [
|
|
"workbench.action.toggleSidebarVisibility",
|
|
"workbench.files.action.focusFilesExplorer"
|
|
]
|
|
},
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space e",
|
|
"command": "runCommands",
|
|
"args": {
|
|
"commands": [
|
|
"workbench.action.toggleSidebarVisibility",
|
|
"workbench.action.focusActiveEditorGroup"
|
|
]
|
|
},
|
|
"when": "sideBarFocus && !inputFocus"
|
|
},
|
|
{
|
|
"key": "space e",
|
|
"command": "workbench.action.toggleSidebarVisibility",
|
|
"when": "vim.mode == 'Normal' && foldersViewVisible"
|
|
},
|
|
|
|
// Editor
|
|
{
|
|
"key": "shift shift",
|
|
"command": "workbench.action.quickOpen",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+alt+f",
|
|
"command": "workbench.action.findInFiles",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space p",
|
|
"command": "editor.action.clipboardPasteAction",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space y",
|
|
"command": "editor.action.clipboardCopyAction",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space x o",
|
|
"command": "workbench.action.closeOtherEditors",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+n",
|
|
"command": "-workbench.action.files.newUntitledFile"
|
|
},
|
|
|
|
// File Explorer
|
|
{
|
|
"key": "r",
|
|
"command": "renameFile",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
|
},
|
|
{
|
|
"key": "y",
|
|
"command": "filesExplorer.copy",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
|
},
|
|
{
|
|
"key": "p",
|
|
"command": "filesExplorer.paste",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
|
},
|
|
{
|
|
"key": "x",
|
|
"command": "filesExplorer.cut",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
|
},
|
|
{
|
|
"key": "d",
|
|
"command": "deleteFile",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
|
},
|
|
{
|
|
"key": "n",
|
|
"command": "explorer.newFile",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
|
},
|
|
{
|
|
"key": "shift+n",
|
|
"command": "explorer.newFolder",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
|
},
|
|
{
|
|
"key": "s",
|
|
"command": "explorer.openToSide",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
|
},
|
|
{
|
|
"key": "shift+s",
|
|
"command": "runCommands",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus",
|
|
"args": {
|
|
"commands": [
|
|
"workbench.action.splitEditorDown",
|
|
"explorer.openAndPassFocus",
|
|
"workbench.action.closeOtherEditors"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"key": "enter",
|
|
"command": "explorer.openAndPassFocus",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceIsFolder && !inputFocus"
|
|
},
|
|
{
|
|
"key": "enter",
|
|
"command": "list.toggleExpand",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && explorerResourceIsFolder && !inputFocus"
|
|
},
|
|
|
|
// Coding
|
|
{
|
|
"key": "shift+k",
|
|
"command": "editor.action.showHover",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "shift+j",
|
|
"command": "editor.action.moveLinesDownAction",
|
|
"when": "vim.mode == 'VisualLine' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "shift+k",
|
|
"command": "editor.action.moveLinesUpAction",
|
|
"when": "vim.mode == 'VisualLine' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space c i",
|
|
"command": "editor.action.goToImplementation",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space c r",
|
|
"command": "editor.action.goToReferences",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space c s",
|
|
"command": "workbench.action.gotoSymbol",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space c w",
|
|
"command": "workbench.action.showAllSymbols",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space o",
|
|
"command": "workbench.action.gotoSymbol",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space d w",
|
|
"command": "workbench.actions.view.problems",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space d t",
|
|
"command": "runCommands",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus",
|
|
"args": {
|
|
"commands": ["workbench.view.extension.todo-tree-container"]
|
|
}
|
|
},
|
|
|
|
// Git
|
|
{
|
|
"key": "space g g",
|
|
"command": "runCommands",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus",
|
|
"args": {
|
|
"commands": ["workbench.view.scm", "workbench.scm.focus"]
|
|
}
|
|
},
|
|
{
|
|
"key": "] g",
|
|
"command": "workbench.action.editor.nextChange",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "[ g",
|
|
"command": "workbench.action.editor.previousChange",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space g b",
|
|
"command": "git.checkout",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space g p",
|
|
"command": "editor.action.dirtydiff.next",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus && !textCompareEditorActive"
|
|
},
|
|
{
|
|
"key": "space g c",
|
|
"command": "git-graph.view",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus && !textCompareEditorActive"
|
|
},
|
|
{
|
|
"key": "space g l",
|
|
"command": "git-graph.view",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus && !textCompareEditorActive"
|
|
},
|
|
|
|
// Test commands
|
|
{
|
|
"key": "space t t",
|
|
"command": "testing.runAtCursor",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space t f",
|
|
"command": "testing.runCurrentFile",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space t w",
|
|
"command": "testing.runAll",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
},
|
|
{
|
|
"key": "space t x",
|
|
"command": "testing.cancelRun",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
|
|
}
|
|
]
|