Many good editors allow a block select when you hold down Alt and drag across your code.
Would be a nice feature to allow selection of multiple lines but only certain columns.
Block select works for me by dragging the mouse while holding Ctrl + Shift (On Linux, depending on your platform it might be different keys).
Works with Option+Shift on Mac OS X.
@cawoodm please try
SHIFT+ALT left mouse - works for me.
Little correction: when i use SHIFT+ALT and left mouse it works... but does not select the Code you would be expecting:
Cursor is at line 2
Press SHIFT+ALT and left mouse button at line 20
Drag to the desired Position at line 25
It now selects all the text from line 2 to line 25... it would be expected that it would be 20 to 25
Agree with @Raydir, it should select from where you click and not from the cursor. It should also be a programmable hotkey as many people are used to Alt+Drag for block selections.
VS Code has implemented Alt+Shift+Click, and Alt+Shift+Click+Drag.
This specifically does block highlighting from the current cursor location to wherever you click/drag to.
In addition to that behavior, most editors (including old school Visual Studio) implement Alt+Click+Drag to do highlighting from the location of your initial click to wherever you drag to. _This behavior is missing in VS Code._ Alt+Click+Drag would be an excellent addition to the current functionality.
As a tangent, Visual Studio and other editors often implement Alt+Shift+Arrows to navigate your cursor to do block highlighting. These keystrokes seem to be in other use in VSCode, which I find to be unexpected/unintuitive.
Fully agree with @amtwo. I am sad to see this feature missing.
Also, I believe this is a duplicate of #29110
This is a duplicate of #5402 (and many other tickets, #5402 is the oldest as far as I can see). Please ensure you give that one a thumbs up.
Most helpful comment
VS Code has implemented Alt+Shift+Click, and Alt+Shift+Click+Drag.
This specifically does block highlighting from the current cursor location to wherever you click/drag to.
In addition to that behavior, most editors (including old school Visual Studio) implement Alt+Click+Drag to do highlighting from the location of your initial click to wherever you drag to. _This behavior is missing in VS Code._ Alt+Click+Drag would be an excellent addition to the current functionality.
As a tangent, Visual Studio and other editors often implement Alt+Shift+Arrows to navigate your cursor to do block highlighting. These keystrokes seem to be in other use in VSCode, which I find to be unexpected/unintuitive.