add: update setting for vscode vim

This commit is contained in:
an920107 2024-07-15 03:57:09 +08:00
parent 4291878eff
commit e05f04677f
2 changed files with 64 additions and 9 deletions

View File

@ -2,13 +2,13 @@
[
// Editor switch
{
"key": "ctrl-shift-k",
"command": "workbench.action.previousEditorInGroup",
"key": "ctrl-shift-j",
"command": "workbench.action.nextEditorInGroup",
"when": "editorTextFocus && !editorReadonly && vim.active"
},
{
"key": "ctrl-shift-j",
"command": "workbench.action.nextEditorInGroup",
"key": "ctrl-shift-k",
"command": "workbench.action.previousEditorInGroup",
"when": "editorTextFocus && !editorReadonly && vim.active"
},
// Move lines up and down
@ -22,6 +22,27 @@
"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",
@ -34,14 +55,14 @@
"when": "explorerViewletFocus"
},
{
"key": "ctrl+shift+e",
"key": "escape",
"command": "workbench.action.toggleSidebarVisibility",
"when": "explorerViewletFocus"
},
// Terminal management
{
"key": "ctrl+shift+;",
"command": "workbench.action.togglePanel",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "ctrl+shift+n",
@ -62,5 +83,20 @@
"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"
}
]

View File

@ -18,10 +18,12 @@
"MD024": false
},
"editor.minimap.enabled": false,
// Vim settings
"vim.leader": "<Space>",
"vim.hlsearch": true,
"vim.easymotion": true,
"vim.useSystemClipboard": true,
"vim.smartRelativeLine": true,
"vim.normalModeKeyBindings": [
{
"before": [
@ -41,6 +43,15 @@
"k"
]
},
{
"before": [
"/",
"/"
],
"commands": [
":noh"
]
},
{
"before": [
"<Leader>",
@ -170,12 +181,21 @@
{
"before": [
"<Leader>",
"f"
"g"
],
"commands": [
"workbench.action.quickOpen"
]
},
{
"before": [
"<Leader>",
"f"
],
"commands": [
"workbench.files.action.showActiveFileInExplorer"
]
},
{
"before": [
"<Leader>",
@ -250,6 +270,5 @@
"editor.action.outdentLines"
]
}
],
"vim.smartRelativeLine": true
]
}