mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-05 00:41:44 +05:30
- VIM: Remove Neovim plugin and use VIM since it is easier to set keymaps - VIM: Keybindings made similar to Neovim - UI: Theme changed to Catppuccin-Mocha - Settings: Remove distractions, group settings, search exclusions
357 lines
10 KiB
JSON
357 lines
10 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": "alt+q",
|
|
"command": "workbench.action.terminal.focus"
|
|
},
|
|
{
|
|
"key": "alt+q",
|
|
"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+f1",
|
|
"command": "workbench.action.terminal.toggleTerminal",
|
|
"when": "terminal.active"
|
|
},
|
|
{
|
|
"key": "shift+escape",
|
|
"command": "workbench.action.toggleSidebarVisibility"
|
|
},
|
|
|
|
// vim.keybindings
|
|
// 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"
|
|
},
|
|
{
|
|
"key": "space b x",
|
|
"command": "workbench.action.closeActiveEditor",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"key": "space y",
|
|
"command": "editor.action.clipboardCopyAction",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space x o",
|
|
"command": "workbench.action.closeOtherEditors",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "ctrl+n",
|
|
"command": "-workbench.action.files.newUntitledFile"
|
|
},
|
|
|
|
// File Explorer
|
|
{
|
|
"key": "r",
|
|
"command": "renameFile",
|
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
|
},
|
|
{
|
|
"key": "c",
|
|
"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"
|
|
},
|
|
{
|
|
"key": "space c r",
|
|
"command": "editor.action.goToReferences",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space c s",
|
|
"command": "workbench.action.gotoSymbol",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space c w",
|
|
"command": "workbench.action.showAllSymbols",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space o",
|
|
"command": "workbench.action.gotoSymbol",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space d w",
|
|
"command": "workbench.actions.view.problems",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
|
|
// Git
|
|
{
|
|
"key": "space g g",
|
|
"command": "runCommands",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus",
|
|
"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"
|
|
},
|
|
{
|
|
"key": "space g p",
|
|
"command": "editor.action.dirtydiff.next",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !textCompareEditorActive"
|
|
},
|
|
{
|
|
"key": "space g c",
|
|
"command": "git-graph.view",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !textCompareEditorActive"
|
|
},
|
|
{
|
|
"key": "space g l",
|
|
"command": "git-graph.view",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus && !textCompareEditorActive"
|
|
},
|
|
|
|
// Test commands
|
|
{
|
|
"key": "space t t",
|
|
"command": "testing.runAtCursor",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space t f",
|
|
"command": "testing.runCurrentFile",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space t w",
|
|
"command": "testing.runAll",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
},
|
|
{
|
|
"key": "space t x",
|
|
"command": "testing.cancelRun",
|
|
"when": "vim.mode == 'Normal' && editorTextFocus"
|
|
}
|
|
|
|
// Make the following work: ctrl+n & ctrl+p for navigation through dropdown
|
|
// {
|
|
// "key": "ctrl+n",
|
|
// "command": "selectNextSuggestion",
|
|
// "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
|
|
// },
|
|
// {
|
|
// "key": "ctrl+p",
|
|
// "command": "selectPrevSuggestion",
|
|
// "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
|
|
// },
|
|
]
|