找到 keybindings.json文件的地址用记事本更改

在最下面添加如下代码
,{
"key": "enter",
"command": "acceptSelectedSuggestion",
"when": "editorTextFocus && suggestWidgetVisible"
}

保存退出即可
本文介绍如何在 VSCode 中设置快捷键以使用 Enter 键接受代码建议。通过编辑 keybindings.json 文件并添加特定代码实现功能。
找到 keybindings.json文件的地址用记事本更改

在最下面添加如下代码
,{
"key": "enter",
"command": "acceptSelectedSuggestion",
"when": "editorTextFocus && suggestWidgetVisible"
}

保存退出即可
2383
909
5146
1万+

被折叠的 条评论
为什么被折叠?