Reputation: 29139
How do you select a range of lines (from a start line number to an end line number) in Visual Studio Code?
Upvotes: 47
Views: 58322
Reputation: 1
Hi y'all I found a really fun way to do it. Ctrl-= will select to the last go back.
Upvotes: -1
Reputation: 2525
I had to delete lines starting from line number 17158 through 1644546 which was nearly impossible to do if I used scrolling. So I followed 4 simple steps:
Ctrl+G
which opens a box to enter the line number to go to.Upvotes: 74
Reputation: 4609
Since version 1.46 it seems like you can set an anchor and select from anchor to cursor: https://code.visualstudio.com/updates/v1_46#_accessibility
To cancel selection hit esc
.
Upvotes: 60
Reputation: 598
Try this out... Type #region at the start of the line which you want to select and #endregion at the end of the line and collapse it using the side ruler available in VS code .Now since it will in a single region you can select the region easily
Upvotes: 6
Reputation: 634
Click at the first column of the first line. Then scroll down to the last line that you want to select, HOLD Shift key and click on the last line.
Upvotes: 38