IntelliJ IDEA suggests several ways to close editor tabs.
- On the main menu point to , choose one of the appropriate closing
commands.
- Close
- Closes the file in the active tab.
- Close All
- Closes all editor tabs.
- Close Others
-
Closes all tabs except the current one. The alternative way to close all other tabs lays with clicking the
button, while holding the ⌥ key pressed:

- Close Unmodified
- Closes all files that were not changed. This command is only available, when version control integration is enabled in project.
- Close All But Pinned
- Closes all files that were not pinned. This command appears, if there are pinned editor tabs.
- Right-click any editor tab, and choose same commands on the context menu.
- Point with your mouse cursor to a tab and click the middle mouse button.
- Point with your mouse cursor to a tab and click
. - Press ⌘W or ⌘W⌘F4 or ⌘F4⌘W or ⌘W^ F4, ⌃F4 or ⌃F4^ F4, ^ X, K, ^ X, 0, ⌃F4, ⌃X, K, ⌃X, 0, ⌃F4, ⌃X, K or ⌃X, 0.
When you close modified files, IntelliJ IDEA preserves all changes in the current editing session. After reopening such files, the results of editing are restored.