Format selection: the shortcut in both apps
On Windows it is usually Ctrl+K Ctrl+F (2 of 2 apps). The table shows where each app agrees and where it differs.
| App | Mac | Windows | Linux |
|---|---|---|---|
| Visual StudioFormat the selection | — | CtrlK,CtrlF | — |
| VS CodeFormat selection | CmdK,CmdF | CtrlK,CtrlF | CtrlK,CtrlF |
How the apps compare
- Mac: Cmd+K Cmd+F in VS Code.
- Windows: every app here uses CtrlK,CtrlF.
- Linux: Ctrl+K Ctrl+F in VS Code.
Learn it by pressing it: Visual Studio shortcuts practice or VS Code shortcuts practice.