Unknown Xcode Shortcut

This unknown Xcode shortcut will allow you to close all the tabs, keeping the selected one open.

Francesco Leoni

1 min read

We all know very well that to use any IDE effectively, knowing its shortcuts is really important. It saves a lot of time.

So here is a really useful shortcut I discovered randomly while using Xcode.

It allows to close all the open tabs, except the one you need.

Here is the shortcut:

⌥ + ⌘ and click on the little 'x' on the file tab you want to keep open.

If you have any question about this article, feel free to email me or tweet me @franceleonidev and share your opinion.

Thank you for reading and see you in the next article!

Share this article

Related articles

How To Take an Xcode Simulator Screenshot without Shadows

See how to take a ready to use screenshot of the Xcode Simulator embedded in the device bezel without any shadow or toolbar.

1 min read


Format Functions to Multiple Lines in Xcode 15

Make you code easier to read formatting your functions to multiple lines with the option 'Format to Multiple Lines' in Xcode 15.

2 min read


Fix “Cycle Inside“ Error in Xcode

See how to fix the “Cycle Inside“ error in Xcode. This error happens because there is an issue with the order of scripts.

1 min read