7

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
mmr
  • 14,781
  • 29
  • 95
  • 145
  • 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 – Garrett Jun 20 '13 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. – mmr Jun 20 '13 at 18:17
  • Possible duplicate of [Where is the basic Control-TAB (MRU) behavior in XCode?](https://stackoverflow.com/questions/3563125/where-is-the-basic-control-tab-mru-behavior-in-xcode) – Peter Lamberg Sep 25 '19 at 12:21

4 Answers4

18

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.

Patrick Tescher
  • 3,387
  • 1
  • 18
  • 31
8

Try ctrl + cmd + left Arrow/right Arrow

pringi
  • 3,987
  • 5
  • 35
  • 45
Kaisp
  • 326
  • 2
  • 8
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.

rob mayoff
  • 375,296
  • 67
  • 796
  • 848
  • 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. – mmr Jun 20 '13 at 20:15
  • 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? – mmr Jun 20 '13 at 20:18
  • Oops. I have changed my answer to use Xcode 4.6.3 instead of *REDACTED*. – rob mayoff Jun 20 '13 at 20:22
  • In the Key Bindings preferences, you can bind the “Select Next Tab” command to control-tab or some other one-handed combination. – rob mayoff Jun 20 '13 at 20:23
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).

HAS
  • 19,140
  • 6
  • 31
  • 53
  • 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. – mmr Jun 20 '13 at 20:13
  • 1
    OK, I got this to work in XCode 4 (you're right, it works there), and I gotta admit, this is pretty dope. – mmr Jun 20 '13 at 20:17