Format the file keyboard shortcut in 6 apps
Format the file has a documented keyboard shortcut in 6 apps here, among them Android Studio, Eclipse IDE, IntelliJ IDEA, Visual Studio. The most common keys are Ctrl + Alt + L on Windows and Cmd + Option + L on a Mac.
Keys on this page were last checked against their sources on September 14, 2026.
| App | Windows | Mac | What it does |
|---|---|---|---|
| Android Studio | Windows Ctrl + Alt + L | Mac Cmd + Option + L | Reformat the code |
| Eclipse IDE | Windows Ctrl + Shift + F | Mac Not documented | Format the code |
| IntelliJ IDEA | Windows Ctrl + Alt + L | Mac Cmd + Option + L | Reformat the code |
| Visual Studio | Windows Ctrl + K then Ctrl + D | Mac Not documented | Format the whole document |
| Visual Studio Code | Windows Shift + Alt + F | Mac Shift + Option + F | Format the current file |
| Zed | Windows Shift + Alt + F | Mac Cmd + Shift + I | Format the file |
What most apps settled on for Format the file
On Windows, Ctrl + Alt + L is the combination in 2 of the 6 apps here that document one. On a Mac, it is Cmd + Option + L in 2 of 4. 4 apps go their own way on Windows, and the table above is where to find them.
Where the table is deliberately empty
2 apps here publish no Mac key for Format the file, so those cells are left blank. A blank there is a gap in that maker documentation for Format the file, not an oversight here, and it is never filled by converting the other system.
If the keys for Format the file do nothing
The 6 apps listed here each decide this for themselves, so the first thing to check is that you are reading the row for the app you are actually in, and the column for your system. After that, check the app version, since format the file is the kind of command makers move between releases. Report a correction
Looking for everything one app can do? Browse apps