Format document: the shortcut in 8 apps
On Mac it is usually Option+Cmd+L (2 of 7 apps); on Windows it is usually Ctrl+Alt+L (3 of 8 apps); on Linux it is usually Ctrl+Shift+I (3 of 7 apps). The table shows where each app agrees and where it differs.
| App | Mac | Windows | Linux |
|---|---|---|---|
| CursorFormat the document | OptionShiftF | AltShiftF | CtrlShiftI |
| EclipseFormat the code | ShiftCmdF | CtrlShiftF | CtrlShiftF |
| IntelliJReformat code | OptionCmdL | CtrlAltL | CtrlAltL |
| Visual StudioFormat the document | — | CtrlK,CtrlD | — |
| PyCharmReformat code | OptionCmdL | CtrlAltL | CtrlAltL |
| VS CodeFormat document | OptionShiftF | AltShiftF | CtrlShiftI |
| WebStormReformat code | OptionCmdL | CtrlAltL | CtrlAltL |
| ZedFormat the file | ShiftCmdI | CtrlShiftI | CtrlShiftI |
How the apps compare
- Mac: Option+Cmd+L in PyCharm and WebStorm; Option+Shift+F in Cursor; Shift+Cmd+F in Eclipse; Cmd+Option+L in IntelliJ; Shift+Option+F in VS Code; Shift+Cmd+I in Zed.
- Windows: Ctrl+Alt+L in IntelliJ, PyCharm and WebStorm; Alt+Shift+F in Cursor; Ctrl+Shift+F in Eclipse; Ctrl+K Ctrl+D in Visual Studio; Shift+Alt+F in VS Code; Ctrl+Shift+I in Zed.
- Linux: Ctrl+Shift+I in Cursor, VS Code and Zed; Ctrl+Alt+L in IntelliJ, PyCharm and WebStorm; Ctrl+Shift+F in Eclipse.
Learn it by pressing it: Cursor shortcuts practice, Eclipse shortcuts practice, IntelliJ shortcuts practice, Visual Studio shortcuts practice, PyCharm shortcuts practice, VS Code shortcuts practice, WebStorm shortcuts practice or Zed shortcuts practice.