需要修改VS Code的快捷键配置文件:C:\Users\用户名\AppData\Roaming\Code\User\keybindings.json

    1. [
    2. {
    3. "key": "enter",
    4. "command": "acceptSelectedSuggestion",
    5. "when": "editorTextFocus && suggestWidgetVisible"
    6. }
    7. ,{
    8. "key": "ctrl+k",
    9. "command": "workbench.action.terminal.clear",
    10. "when": "terminalFocus"
    11. }
    12. ]

    文本的作用为:

    • 回车键自动补全代码
    • Ctrl+K 清空命令行