在 Visual Studio 代码中,如何使用键盘快捷键清除多行光标

In Visual Studio Code, how does one clear multi-line cursors using a keyboard shortcut

在 Visual Studio 代码中,您可以使用键盘快捷键在当前行上方和下方创建多个光标,从而允许在代码中的多个位置进行编辑。另见 docs

但是,完成多行编辑后,如何使用键盘快捷键清除多个光标?

keybindings.json (而不是 ctrl+; 你可以使用你的键绑定:

{
    "key": "ctrl+;",
    "command": "removeSecondaryCursors",
    "when": "editorHasMultipleSelections && editorTextFocus"
},
{
    "key": "escape",
    "command": "-removeSecondaryCursors",
    "when": "editorHasMultipleSelections && editorTextFocus"
}

如果我没记错的话,你问的是如何退出多行编辑模式?我相信你只需按 esc