Search code examples
xcode4

Close Other tabs in XCode 4?


Am I crazy or is it not possible to close other tabs in XCode 4? I have about 7 tabs opened littering my workspace. I right click the one tab I'm interested in to bring up the context menu. I can see options to open a "new tab", "close tab", "close other tabs", and "move tab to new window". However, the only option that is not greyed out is "new tab". Do I have to put XCode in some magical state to enable the other options? Are these options merely eye candy, teasing me with hopes and aspirations of things I might like to do? Is this some weird kind of year long April fools gag? Inquiring minds wanna know. *Update Uploading a HocusFocus screen capture for clarity... enter image description here


Solution

  • You should be able to hover over the tab and click on the cross that appears on the left hand side of the tab. However, if you are not seeing this cross for some strange reason - you should be able to close the current tab in XCode (similar to many other OSX applications) by pressing CMD+W on your keyboard.

    While the context menu doesn't work when you right click on a tab, you can achieve all of the same results by using keyboard shortcuts (which do seem to work as expected). Each of the 4 options on the context menu maps to the following shortcuts;

    New Tab: CMD + T

    Close Tab: CMD + W

    Close Other Tabs: CMD + ALT + W

    Move Tab to Other Window: I couldn't find a keyboard shortcut, but you can click and drag the tab away from the menu bar.

    There doesn't appear to be a sensible way to enable the context menu on the tabs at the current time.