Adding and removing selections

While VSCode comes with a way to add or remove multiple selections (Ctrl/Cmd - D) the following commands provide a bit more flexibility in this behavior by introducing the notion of a "primary" selection. You can remove the primary selection and you can add new selections relative to this primary selection.

The primary selection also changes how selections are canceled and restored from memory: on a restore the primary selection is always the selection closest to the current cursor position. On a cancel, the cursor is placed at the location of the primary selection.

View on GitHub