A2oz

What is the shortcut for multi-line select in VS Code?

Published in Programming 1 min read

The shortcut for multi-line select in VS Code is Alt + Click. This shortcut allows you to select multiple lines of code simultaneously, making it easier to edit, copy, or move them.

How to use it:

  • Select the first line: Click on the line number to select an entire line.
  • Hold down Alt key and click on the line number of the next line you want to select. This will add the line to your selection.
  • Repeat the process for all lines you want to select.

Practical Insights:

  • Multiple selections: You can select multiple non-contiguous lines by holding down Alt and clicking on the line numbers.
  • Column Selection: You can also use Alt + Shift + Arrow keys to select a column of text.
  • Drag and Drop: Once you have selected multiple lines, you can drag and drop them to a different location in your code.

Related Articles