Skip to content

Instantly share code, notes, and snippets.

@kashewnuts
Last active June 21, 2023 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kashewnuts/4f7cc140c32f5e2a12d93108aeeff68d to your computer and use it in GitHub Desktop.
Save kashewnuts/4f7cc140c32f5e2a12d93108aeeff68d to your computer and use it in GitHub Desktop.
vscodevim用にカスタマイズしたkeybindings
// 既定値を上書きするには、このファイル内にキー バインドを挿入します
[
{
"key": "ctrl+j",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+n",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+k",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
},
{
"key": "ctrl+p",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
},
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+n",
"command": "selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+p",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+]",
"command": "editor.action.goToImplementation",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "ctrl+]",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "ctrl+]",
"command": "editor.gotoNextSymbolFromResult",
"when": "hasSymbols"
},
// NOTE: 設定したいが、whenの指定方法が分からず。適当に設定すると他のctrl-]とバッティングする。
// {
// "key": "ctrl+]",
// "command": "editor.action.openLink",
// },
{
"key": "ctrl+]",
"command": "goToNextReference",
"when": "inReferenceSearchEditor || referenceSearchVisible"
},
{
"key": "ctrl+o",
"command": "workbench.action.navigateBack",
"when": "vim.mode == 'Normal' && editorTextFocus"
},
{
"key": "ctrl+i",
"command": "workbench.action.navigateForward",
"when": "vim.mode == 'Normal' && editorTextFocus"
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment