Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select whole line in VSCode

I am using VSCode on a Mac.

Does anyone know how to select the entire line that the cursor is on? I know about Command+I, but that only selects what appears to be the whole line, which is not always the whole line if I have word wrap enabled.

I am looking for something like Sublime Text's "Expand Selection to Line" command.

like image 681
Elias Zamaria Avatar asked Feb 07 '19 22:02

Elias Zamaria


People also ask

How do you select a whole line in VS Code shortcut?

You can select blocks of text by holding Shift+Alt (Shift+Option on macOS) while you drag your mouse. A separate cursor will be added to the end of each selected line. You can also use keyboard shortcuts to trigger column selection.


1 Answers

  1. Triple click at any point on the line
  2. Click once on number of the line
  3. Press Command + L
like image 168
Mahmoud Kadoum Avatar answered Oct 01 '22 15:10

Mahmoud Kadoum