Toggle fold: the shortcut in 3 apps
Each app binds this differently. The table shows the keys in IntelliJ, Visual Studio and VS Code side by side.
| App | Mac | Windows | Linux |
|---|---|---|---|
| IntelliJExpand or collapse a block | Cmd=orCmd- | Ctrl=orCtrl- | Ctrl=orCtrl- |
| Visual StudioCollapse or expand the block | — | CtrlM,CtrlM | — |
| VS CodeToggle fold | CmdK,CmdL | CtrlK,CtrlL | CtrlK,CtrlL |
How the apps compare
- Mac: Cmd+= in IntelliJ; Cmd+K Cmd+L in VS Code.
- Windows: Ctrl+= in IntelliJ; Ctrl+M Ctrl+M in Visual Studio; Ctrl+K Ctrl+L in VS Code.
- Linux: Ctrl+= in IntelliJ; Ctrl+K Ctrl+L in VS Code.
Learn it by pressing it: IntelliJ shortcuts practice, Visual Studio shortcuts practice or VS Code shortcuts practice.