vscode设置快捷键控制光标移动(替代上下左右)
参考文档:https://blog.csdn.net/weixin_42158546/article/details/112463296
设置双快捷键控制光标上下左右移动
我的设置json文件如下
追加配置文件:
{
"key": "alt+k",
"command": "cursorUp",
"when": "textInputFocus"
},
{
"key": "up",
"command": "cursorUp",
"when": "textInputFocus"
},
{
"key": "alt+k",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "up",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "alt+j",
"command": "cursorDown",
"when": "textInputFocus"
},
// {
// "key": "down",
// "command": "cursorDown",
// "when": "textInputFocus"
// },
{
"key": "alt+j",
"command": "selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
// {
// "key": "down",
// "command": "-selectNextSuggestion",
// "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
// },
{
"key": "alt+l",
"command": "cursorRight",
"when": "textInputFocus"
},
{
"key": "right",
"command": "cursorRight",
"when": "textInputFocus"
},
{
"key": "alt+h",
"command": "cursorLeft",
"when": "textInputFocus"
},
{
"key": "left",
"command": "cursorLeft",
"when": "textInputFocus"
},
{
"key": "alt+i",
"command": "cursorEnd",
"when": "textInputFocus"
},
{
"key": "end",
"command": "cursorEnd",
"when": "textInputFocus"
},
{
"key": "alt+y",
"command": "cursorHome",
"when": "textInputFocus"
},
{
"key": "home",
"command": "cursorHome",
"when": "textInputFocus"
}
]