Skip to content

↑↓ moveEnter openEsc close

Collapse or expand all blocks in Visual Studio

Visual Studio 2022 (17.14) · 55 shortcuts · checked Nov 2026 · Source: Microsoft docs

In Microsoft Visual Studio, press Ctrl+M Ctrl+L.

WindowsCtrlM,CtrlL

A chord: press each combination in turn.

More Visual Studio shortcuts: editing

ActionKeys
Quick actions and refactoringsCtrl.orAltEnter
RenameCtrlR,CtrlR
Extract methodCtrlR,CtrlM
Comment the selectionCtrlK,CtrlC
Uncomment the selectionCtrlK,CtrlU
Format the documentCtrlK,CtrlD
Format the selectionCtrlK,CtrlF
Duplicate the line or selectionCtrlD
Delete the lineCtrlShiftL
Move the line upAlt↑

All 19 in editing · All 55 Visual Studio shortcuts