步骤
-
打开 VS Code 命令栏(View -> ), 输入 Open Keyboard Shortcuts, 选 Json 项
打开 VS Code 命令栏
输入 Open Keyboard Shortcuts, 选 Json 项
-
修改对应配置快捷键
个人配置附录
向下复制一行
{
"command": "editor.action.copyLinesDownAction",
"key": "shift+alt+down",
"when": "editorTextFocus && !editorReadonly"
}
删除一行
{
"command": "editor.action.deleteLines",
"key": "ctrl+d",
"when": "textInputFocus && !editorReadonly"
}
提示信息回车上屏
{
"command": "acceptSelectedSuggestion",
"key": "[Enter]",
"when": "suggestWidgetVisible && textInputFocus"
},
{
"command": "acceptSelectedSuggestion",
"key": "[Enter]",
"when": "acceptSuggestionOnEnter && suggestWidgetVisible && suggestionMakesTextEdit && textInputFocus"
}
参数提示信息
可能快捷键设置不生效,可能是与 VS Code 本身快捷键冲突, 移除即可, 比如设置为 ctrl+q 与 show hover 冲突了, 移除 show hover 快捷键
{
"command": "editor.action.triggerParameterHints",
"key": "ctrl+q",
"when": "editorHasSignatureHelpProvider && editorTextFocus"
}