From 0071d65eabd3bf52ff2af4a96cebcc0ad803c320 Mon Sep 17 00:00:00 2001 From: "Yu Squire[ Yu, Tsung-Ying ]" Date: Fri, 1 Nov 2024 11:48:06 +0800 Subject: [PATCH] update vscode --- vscode/keybindings.json | 38 +++++++++++++++++++++++++------------- vscode/settings.json | 24 +++++++++++++++--------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/vscode/keybindings.json b/vscode/keybindings.json index 3c124a9..66cfb2c 100644 --- a/vscode/keybindings.json +++ b/vscode/keybindings.json @@ -33,6 +33,16 @@ "command": "selectPrevSuggestion", "when": "suggestWidgetVisible" }, + { + "key": "ctrl+j", + "command": "selectNextCodeAction", + "when": "codeActionMenuVisible" + }, + { + "key": "ctrl+k", + "command": "selectPrevCodeAction", + "when": "codeActionMenuVisible" + }, { "key": "ctrl+j", "command": "workbench.action.quickOpenSelectNext", @@ -43,6 +53,17 @@ "command": "workbench.action.quickOpenSelectPrevious", "when": "inQuickOpen" }, + // Code suggest and quick fix + { + "key": "ctrl+/", + "command": "editor.action.triggerSuggest", + "when": "editorTextFocus && !editorReadonly && vim.active" + }, + { + "key": "ctrl+.", + "command": "editor.action.quickFix", + "when": "editorTextFocus && !editorReadonly && vim.active" + }, // File management { "key": "ctrl+n", @@ -84,19 +105,10 @@ "command": "workbench.action.terminal.focusPrevious", "when": "terminalFocus" }, + // Outline { - "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" + "key": "escape", + "command": "workbench.action.toggleSidebarVisibility", + "when": "view.outline.visible" } ] diff --git a/vscode/settings.json b/vscode/settings.json index a48a155..39e1b91 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -19,11 +19,17 @@ }, "editor.minimap.enabled": false, // Vim settings + "extensions.experimental.affinity": { + "vscodevim.vim": 1, + "asvetliakov.vscode-neovim": 1 + }, "vim.leader": "", "vim.hlsearch": true, "vim.easymotion": true, "vim.useSystemClipboard": true, "vim.smartRelativeLine": true, + "vim.statusBarColorControl": false, + "vim.ignorecase": true, "vim.normalModeKeyBindings": [ { "before": [ @@ -245,15 +251,6 @@ } ], "vim.visualModeKeyBindings": [ - { - "before": [ - "j", - "k" - ], - "after": [ - "" - ] - }, { "before": [ "" @@ -269,6 +266,15 @@ "commands": [ "editor.action.outdentLines" ] + }, + { + "before": [ + "p" + ], + "commands": [ + "editor.action.clipboardPasteAction", + "extension.vim_escape" + ] } ] }