Hacker News new | past | comments | ask | show | jobs | submit login

> 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"




Or just right click on the selected lines and Stage Selected Range




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: