dotfiles/vscode/keybindings.json
2024-07-15 03:57:09 +08:00

103 lines
2.7 KiB
JSON

// Place your key bindings in this file to override the defaults
[
// Editor switch
{
"key": "ctrl-shift-j",
"command": "workbench.action.nextEditorInGroup",
"when": "editorTextFocus && !editorReadonly && vim.active"
},
{
"key": "ctrl-shift-k",
"command": "workbench.action.previousEditorInGroup",
"when": "editorTextFocus && !editorReadonly && vim.active"
},
// Move lines up and down
{
"key": "alt+j",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly && vim.active"
},
{
"key": "alt+k",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly && vim.active"
},
// Select up and down
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "suggestWidgetVisible"
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "suggestWidgetVisible"
},
{
"key": "ctrl+j",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+k",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
},
// File management
{
"key": "ctrl+n",
"command": "explorer.newFile",
"when": "explorerViewletFocus"
},
{
"key": "ctrl+shift+n",
"command": "explorer.newFolder",
"when": "explorerViewletFocus"
},
{
"key": "escape",
"command": "workbench.action.toggleSidebarVisibility",
"when": "explorerViewletFocus"
},
// Terminal management
{
"key": "ctrl+shift+;",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "ctrl+shift+n",
"command": "workbench.action.terminal.new",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+w",
"command": "workbench.action.terminal.kill",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+j",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+k",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+l",
"command": "workbench.action.positionPanelRight",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+j",
"command": "workbench.action.positionPanelBottom",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+h",
"command": "workbench.action.positionPanelLeft",
"when": "terminalFocus"
}
]