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

In Visual Studio code, you can use a keyboard shortcut to create multiple cursors above and below the current line, allowing to edit on multiple spots in the code. See also the docs

However, once you have done your multiline edits, how does one clear the multiple cursors, using a keyboard shortcut?

Upvotes: 2

Views: 683

Answers (2)

jxramos
jxramos

Reputation: 8266

If I'm not mistaken you're asking how to exit multiline edit mode? I believe you simply press esc

Upvotes: 1

Alex
Alex

Reputation: 67639

keybindings.json (instead of ctrl+; you can use your keybinding):

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

Upvotes: 2

Related Questions