Select Line Shortcut
To select a whole line, put the cursor on it and press ⌘⇧← then ⌘⇧→ on Mac, or Home then Shift+End on Windows. Code editors have a one-key version.
| Action | Mac | Windows | |
|---|---|---|---|
| Select to start of line | ⌘⇧← | Shift+Home | |
| Select to end of line | ⌘⇧→ | Shift+End | |
| Select whole line (VS Code) | ⌘L | Ctrl+L | |
| Select line down | ⇧↓ | Shift+↓ | |
| Select all | ⌘A | Ctrl+A |
Select one line in a text field
Click anywhere on the line, then press Home and hold Shift+End on Windows, or ⌘⇧← then ⌘⇧→ on the Mac, to highlight from edge to edge. This works in browsers, email and word processors.
One-key select line in code editors
In VS Code, Sublime and many IDEs, ⌘L (Mac) / Ctrl+L (Windows) selects the entire current line — press it again to add the next line to the selection.
FAQ
How do I select a whole line with the keyboard?
Press Home then Shift+End on Windows, or ⌘⇧← then ⌘⇧→ on Mac, to select from the start to the end of the line.
Is there a one-key shortcut to select a line?
In code editors like VS Code, Ctrl+L (Windows) or ⌘L (Mac) selects the whole current line at once.
How do I select multiple lines?
Hold Shift and press the down arrow (Shift+↓) to extend the selection line by line.