163

I have opened many tabs while working on project. (new feature in Xcode 4).

But for switching from one tab to other tab, the only way I've found to do this is to use the mouse. Is there any way to switch between different tabs using keyboard shortcuts?

2
  • This still applies to Xcode 8 and most answers still work ok. Commented Dec 7, 2016 at 11:12
  • stackoverflow.com/a/64848763/14531220 this is the right answer now. Commented Nov 15, 2020 at 21:41

5 Answers 5

331

Shortcuts are:

  • CMD + SHIFT + } - Select Next tab
  • CMD + SHIFT + { - Select Previous tab
Sign up to request clarification or add additional context in comments.

3 Comments

That should be command + shift + ..., I think. At least on my machine.
ya it should be command + shift.. the command + } indents the line with a tab
The problem with the Show Next Tab and Show Previous Tab commands is that they don't work in a stack - so its left/right in the tab list and not "the last tab I was at". Is there a way to go back and forth through tab history?
100

The default shortcuts are:

  • + SHIFT + { - Select Next Tab
  • + SHIFT + } - Select Previous Tab

But I prefer going to XCode -> Preferences -> Key bindings and changing them to:

  • CTRL + TAB - Select Next Tab
  • CTRL + SHIFT + TAB - Select Previous Tab

...so they work the same as in Chrome or Safari.

6 Comments

CTRL + TAB is much better and not used by default. Pity that we can't bind last used tab.
I think everybody should assume that people are generally used to browser ~ and use CTR + TAB / CTR + SHIFT + TAB to change tabs.
2nd one is beneficial :)
In Chrome it's also ALT-CMD-Left, so I changed it to that
Looks like CTRL + TAB already works by default on Xcode 9.2.1
|
9

If the shortcuts don't work (because of language, for example), you can define custom shortcut:

  • XCode -> Preferences -> Key bindings

  • Make sure that "all" is selected

  • Define shortcuts for "Select Previous Tab" and "Select Next Tab"

I used cmd+pageup and cmd+pagedown, didn't generate any conflicts.

1 Comment

cmd + pageup is Move to Beginning of Document in Xcode 8 :-(
5

XCode Windows menu option shows it as + } or + { but I think it is a bug since + {/} is used for increase indent or decrease indent. The correct sequence is + shift + } or {.

2 Comments

On my keyboard at least, { and } are shifted [ and ], so I think XCode is actually correct here, just not exactly clear. Personally I would have called it cmd+shift+[ and cmd+shift+]
That's exactly the reason. If you try it out in the Preferences pane you see that if you do cmd+[ it will show that as the shortcut, while if you use cmd+shift+[ it will show cmd+{ as the shortcut.
5

I perfer using BetterTouchTool to switch between tabs(include Chrome, Safari, Finder, Xcode, sublimeText and so on).

BetterTouchTool is a free software.

Just set TipTap Left and TipTap Right to cmd+shift+{ and cmd+shift+}.

And than, you can use trackpads with tiptap to switch between taps.

Here is my configuration:

Hope you will like it.

1 Comment

I love better touch tool. I think it's a great combo when used with XCode

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.