mac电脑(windows电脑也类似 只要找到keybindings.json即可)
- 在vscode界面按command+shift+p
- 在搜索框输入key
- 下翻 找到keybindings.json回车
- 将下列代码复制粘贴到里面保存即可
// 将键绑定放在此文件中以覆盖默认值auto[]
[
{ //回车键选定自动补全
"key": "enter",
"command": "acceptSelectedSuggestion",
"when": "editorTextFocus && suggestWidgetVisible"
},
{ //tab选择下一个
"key": "tab",
"command": "selectNextSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
},
{ //shift+tab"选择上一个
"key": "shift+tab",
"command": "selectPrevSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
}
]