Last active
February 23, 2026 15:49
-
-
Save calloc134/624cbf73d16f597d85c7143b30da6380 to your computer and use it in GitHub Desktop.
VSCodeでマウスを極力使いたくないのでショートカットを考えてもらった
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| /* ========== ペイン(エディタグループ)のフォーカスを左右へ移動 ========== */ | |
| { | |
| "key": "ctrl+k h", | |
| "command": "workbench.action.focusLeftGroup", | |
| "when": "(editorTextFocus || editorFocus) && !terminalFocus", | |
| }, | |
| { | |
| "key": "ctrl+k l", | |
| "command": "workbench.action.focusRightGroup", | |
| "when": "(editorTextFocus || editorFocus) && !terminalFocus", | |
| }, | |
| /* Explorer: 開く/切替 → もう一度で閉じる */ | |
| { | |
| "key": "ctrl+shift+e", | |
| "command": "workbench.action.toggleSidebarVisibility", | |
| "when": "sideBarVisible && activeViewlet == 'workbench.view.explorer'", | |
| }, | |
| { | |
| "key": "ctrl+shift+e", | |
| "command": "workbench.view.explorer", | |
| "when": "!sideBarVisible || activeViewlet != 'workbench.view.explorer'", | |
| }, | |
| /* SCM: 開く/切替 → もう一度で閉じる */ | |
| { | |
| "key": "ctrl+shift+g", | |
| "command": "workbench.action.toggleSidebarVisibility", | |
| "when": "sideBarVisible && activeViewlet == 'workbench.view.scm'", | |
| }, | |
| { | |
| "key": "ctrl+shift+g", | |
| "command": "workbench.view.scm", | |
| "when": "!sideBarVisible || activeViewlet != 'workbench.view.scm'", | |
| }, | |
| /* Search: 開く/切替 → もう一度で閉じる */ | |
| { | |
| "key": "ctrl+shift+f", | |
| "command": "workbench.action.toggleSidebarVisibility", | |
| "when": "sideBarVisible && activeViewlet == 'workbench.view.search'", | |
| }, | |
| { | |
| "key": "ctrl+shift+f", | |
| "command": "workbench.view.search", | |
| "when": "!sideBarVisible || activeViewlet != 'workbench.view.search'", | |
| }, | |
| /* ========== Explorer(ファイルマネージャ)内:j/k + 操作 ========== */ | |
| { | |
| "key": "j", | |
| "command": "list.focusDown", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "k", | |
| "command": "list.focusUp", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "g g", | |
| "command": "list.focusFirst", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "shift+g", | |
| "command": "list.focusLast", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| /* (1) Explorerでも space で「選択+フォーカス維持」してメインにプレビュー表示 */ | |
| { | |
| "key": "space", | |
| "command": "list.selectAndPreserveFocus", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "r", | |
| "command": "renameFile", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "d", | |
| "command": "moveFileToTrash", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "shift+d", | |
| "command": "deleteFile", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "a", | |
| "command": "explorer.newFile", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "shift+a", | |
| "command": "explorer.newFolder", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus", | |
| }, | |
| /* ========== SCM(Git 管理)内:j/k + tig 風 ========== */ | |
| /* (2) inputそのものにフォーカスしていなければ、ボタン等に居ても j/k で移動できるようにする */ | |
| { | |
| "key": "j", | |
| "command": "list.focusDown", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && !inputFocus", | |
| }, | |
| { | |
| "key": "k", | |
| "command": "list.focusUp", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && !inputFocus", | |
| }, | |
| { | |
| "key": "g g", | |
| "command": "list.focusFirst", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && !inputFocus", | |
| }, | |
| { | |
| "key": "shift+g", | |
| "command": "list.focusLast", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && !inputFocus", | |
| }, | |
| { | |
| "key": "space", | |
| "command": "list.selectAndPreserveFocus", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && listFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "s", | |
| "command": "git.stage", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && listFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "u", | |
| "command": "git.unstage", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && listFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "c", | |
| "command": "workbench.scm.action.focusNextInput", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && !inputFocus", | |
| }, | |
| { | |
| "key": "shift+p", | |
| "command": "git.push", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && !inputFocus", | |
| }, | |
| /* ========== Search(横断ファイル検索)内:Vim 風 ========== */ | |
| { | |
| "key": "s", | |
| "command": "workbench.action.findInFiles", | |
| "when": "searchViewletVisible && searchViewletFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "r", | |
| "command": "workbench.action.replaceInFiles", | |
| "when": "searchViewletVisible && searchViewletFocus && !inputFocus", | |
| }, | |
| /* (2) inputそのものにフォーカスしていなければ、ボタン等に居ても j/k で移動できるようにする */ | |
| { | |
| "key": "j", | |
| "command": "list.focusDown", | |
| "when": "searchViewletVisible && searchViewletFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "k", | |
| "command": "list.focusUp", | |
| "when": "searchViewletVisible && searchViewletFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "g g", | |
| "command": "list.focusFirst", | |
| "when": "searchViewletVisible && searchViewletFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "shift+g", | |
| "command": "list.focusLast", | |
| "when": "searchViewletVisible && searchViewletFocus && !inputFocus", | |
| }, | |
| { | |
| "key": "l", | |
| "command": "search.action.openResult", | |
| "when": "searchViewletVisible && searchViewletFocus && fileMatchOrMatchFocus && !inputFocus", | |
| }, | |
| /* タイポ修正: searchiewletFocus -> searchViewletFocus */ | |
| { | |
| "key": "escape", | |
| "command": "search.action.focusSearchList", | |
| "when": "searchViewletVisible && searchViewletFocus && inputFocus", | |
| }, | |
| { | |
| "key": "escape", | |
| "command": "workbench.scm.action.focusNextResourceGroup", | |
| "when": "sideBarFocus && activeViewlet == 'workbench.view.scm' && inputFocus", | |
| }, | |
| /* Git のステージング:Visualモードで選択範囲をステージング */ | |
| { | |
| "key": "ctrl+shift+s", | |
| "command": "git.stageSelectedRanges", | |
| "when": "editorTextFocus && editorHasSelection && vim.active && (vim.mode == 'Visual' || vim.mode == 'VisualLine' || vim.mode == 'VisualBlock')", | |
| }, | |
| /* ========== タブ切替:Ctrl+Tab を Ctrl+PgUp/PgDown 相当に ========== */ | |
| { | |
| "key": "ctrl+tab", | |
| "command": "workbench.action.nextEditor", | |
| "when": "!inEditorsPicker", | |
| }, | |
| { | |
| "key": "ctrl+shift+tab", | |
| "command": "workbench.action.previousEditor", | |
| "when": "!inEditorsPicker", | |
| }, | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment