News for hackers. Stuff that matters.
Re:Magit, the magical Git interface (2017) by ggregoire on Friday October 22, 2021 @11:06AM (#28958180)
> I still haven‘t found out how to select several disconnected lines for staging in VS Code.

In the Source Control window, select your file then in the right panel:

- Select the first range of lines

- Alt + select the second range of lines

- Cmd + Shift + P > "Git: Stage Selected Ranges"

or in multiple steps (I usually do it like that):

- Select the first range of lines

- Cmd + Shift + P > "Git: Stage Selected Ranges"

- Select the second range of lines

- Cmd + Shift + P > "Git: Stage Selected Ranges"

Re:Magit, the magical Git interface (2017) by pitaj on Friday October 22, 2021 @06:17PM (#28963459)
Or just right click on the selected lines and Stage Selected Range