8

I would like to have ctrl-tab behavior in Xcode (4.6, if that's relevant)-- is that available?

I do NOT mean behavior described as in the answer to this question: Xcode - cycle through open windows That is, cmd-` is not what I want to do, because I don't want to use multiple windows.

I mean, I want the editor to behave like Visual Studio or Netbeans, and be able to cycle through the files that I've opened in the same real estate. I don't like having a cloud of windows to navigate through. Is this possible, or is this idiom just not something in Xcode at all?

3
  • I'm not completely clear on what you are asking, but it seems to me like you might be looking for something like the three finger swipe down gesture while in Xcode Commented Jun 20, 2013 at 18:15
  • 1
    @Garrett-- I'm asking for file history behavior like every other IDE on the planet (Eclipse, VS, Netbeans, etc)-- that I can ctrl-tab or some other shortcut through recently opened files. That gesture goes between m and h files, which is kind of helpful, I suppose, but not at all what I want. Thanks though. Commented Jun 20, 2013 at 18:17
  • Possible duplicate of Where is the basic Control-TAB (MRU) behavior in XCode? Commented Sep 25, 2019 at 12:21

4 Answers 4

19

You can use control-2 to bring up the history menu, then up and down to select the file you want. Then control-3 to move forward.

Sign up to request clarification or add additional context in comments.

3 Comments

Ah, interesting-- is there a way to just cycle through this history that you know of via a single shortcut? A 'previous file in the history' shortcut?
Not that I know of, under Preferences -> Key Bindings you can see all the keyboard shortcuts and change them.
This should be the answer!
8

Try ctrl + cmd + left Arrow/right Arrow

Comments

7

One approach is to use more tabs. In the General tab of Xcode's Preferences (as of Xcode 4.6.3), set “Double Click Navigation” to “Use Separate Tab”:

navigation preferences

Then, when you open files by double-clicking them, they will open in new tabs. You can navigate between tabs by typing ⌘ { and ⌘ } (command-shift-left bracket and command-shift-right bracket). You can rebind the “Select Next Tab” and “Select Previous Tab” commands in the Key Bindings preferences if you want to use other keys.

4 Comments

Which XCode is this? I have 4.6.3, and it doesn't have these tabs. For me, this option is under 'general', and I'm trying it while I wait for 5 to dl.
Got this to work too (as well as the 'gestures' approach), and it's pretty fly. The best would be if I could do it with one hand, like ctrl-tab does, rather than having to use both. Maybe I'm just too greedy?
Oops. I have changed my answer to use Xcode 4.6.3 instead of REDACTED.
In the Key Bindings preferences, you can bind the “Select Next Tab” command to control-tab or some other one-handed combination.
1

I think what you want is the following:

Xcode Screenshot

Sorry for using Xcode 5 here, but I think that might be more future-proof and it's the same in Xcode 4.X.
As far as I know there is no shortcut for that behavior but - as in any web view - you can swipe with your finger (1 finger on the Magic Mouse, 2 finger on the Trackpad).

2 Comments

Wait, so in XCode 5, it becomes a gesture to go through history? That's reason enough alone to upgrade, as far as I'm concerned. Time to check it out.
OK, I got this to work in XCode 4 (you're right, it works there), and I gotta admit, this is pretty dope.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.