7

There are already many questions about VS Code's block selection and multi-cursor selection, and I'm not asking how to use it, but rather, how to make it behave in the standard way on a Mac (without the shift ⇧ key pressed).

The way it currently behaves is this: your current cursor location defines one corner of the block selection, and when you press and click somewhere else, you define the opposite corner of the block. You can drag as you're clicking, but dragging really only changes the definition of that opposite corner. Your (text) cursor's position always defines one of the block's corners.

Considering that the VS Code default keybinding is , the behavior is proper for having the shift ⇧ key pressed. But I'm trying to find a way to get the normal behavior that you'd expect on a Mac when the shift ⇧ key is not pressed.

In normal Mac behavior (without shift), the entire block is defined by:

  1. where you first click, before you start dragging, and
  2. where you release, after dragging.

This behavior is exactly the same as for plain-vanilla text selection, except that you get a block, instead of a line-oriented selection.

I would like to find a way to have VS Code allow me to define the block selection solely based on where I click and drag, and not based on the current text cursor location.

How can I do this?

iconoclast
  • 21,213
  • 15
  • 102
  • 138
  • Are you wanting a block selection by default when you click/drag the mouse? Instead of the current default where you get the characters/lines between mouse-down and mouse-up? – JS. Feb 04 '22 at 01:34

1 Answers1

0

Note that you don't have to drag the mouse. You can single click (with no modifier keys) in one corner, press and hold Shift and Option, and click in the opposite corner, then release the Shift and Option keys. So, your attempt to start the selection is actually extending it (relative to the previous selection).

What's working for me in 1.53.1 (January 2021 release) is to click and hold the mouse button (with no keys pressed; this starts a normal, non-column selection), then press and hold Shift and Option, then continue dragging the mouse. I find this method cumbersome and prefer selecting opposite corners as above.

I don't see an obvious way to change to Option-only to start a column selection.

mday
  • 78
  • 7