76

I am currently using xcode and I find it's lack of tabs quite disturbing.

I currently use command-shift-d to search through all the files, or ctrl-1 to open the history of files that were recently opened.

It works but I find it less effective than just tabbing through the few files i am currently working on.

Is there any way, third party or not, to enable some sort of tabbed organization? If not, is there any other way to quickly navigate through a subset of files?

pbreault
  • 14,176
  • 18
  • 45
  • 38

8 Answers8

107

XCode 4 now supports tabs. You can enable by selecting "View / Show Tab Bar" menu.

Ivan Marinov
  • 2,737
  • 1
  • 25
  • 17
  • 10
    It does supports them but not like you would expect, check http://stackoverflow.com/q/5353220/99834 – sorin Mar 18 '11 at 14:14
  • how about keyboard shortcut to rotate between tabs? – meow Mar 30 '11 at 18:05
  • 2
    You can set custom keyboard shortcut to rotate between tabs in "Preferences / Key Bindings / Select Next Tab" option. I agree with Sorin, tabs does not works as expected (like in Eclipse of Visual Studio). I hope Apple will change tab behavior to be conform. – Ivan Marinov Apr 05 '11 at 16:03
  • 8
    changing tabs uses ⌘{ & ⌘} – Ryan Booker Apr 29 '11 at 03:51
  • 33
    The implementation of tabs in Xcode is so poor as to be worthless, imo. I just want tabs in the *editor* like every other IDE on the planet. I don't need a whole freaking duplicated IDE under each tab, they're so heavy-weight it takes 2-3 seconds just to switch to a different tab because it's basically loading everything. – devios1 Mar 19 '13 at 20:42
  • XCode 6 still does not handles tabs as expected :( – Ivan Marinov Jun 04 '14 at 11:52
  • 2
    @devios1 three years later and your comment is 1000000% valid. I wonder why Apple doesn't take care of their IDE – JustADev Nov 23 '16 at 09:23
  • 2
    I'm new to Xcode. First reaction: *where are the tabs?* – Daniel Oct 29 '19 at 14:35
7

Not really, but one alternative is View > Show Favorites Bar and drag five or six frequently-used source files into it. Not as flexible as tabs but satisfies your request for "quickly navigate through a subset of files".

The traditional way is to use the detail view. Get the files you want in the Detail view by one of these means:

  • Put them all in the same group, then select the group
  • Enter a filter expression in the Search Bubble that narrows the items shown
  • Define a Smartgroup that includes just the files you want
  • Get a list of the files as a Find in Project result, then select that item in Find Results

Then you can use the Detail View as your list of interesting files and navigate through it quickly with the up and down arrows.

cdespinosa
  • 20,661
  • 6
  • 33
  • 39
  • If I have the desired file already open in a different window, how do I add it to the Favorites bar? Can I change Xcode to open new files in the same window instead of a new one? – sorin Mar 11 '10 at 12:34
  • The favorites thing seems not to work anymore. Anno 2020, Xcode 11.2.1 – ecth Jan 24 '20 at 15:32
4

First of all, you can use Textmate (which I believe has Xcode integration). Otherwise:

Window (Menu) -> Organizer (ctrl-command-o)

At the bottom of that window, if you don't have two panes, click the square to the right of the gear. Now drag code files of interest to the left, grey pane--a single click or arrow up/down will open the file in the editor pane.

If you do open a bunch of windows, as vog suggested, you'll need to command-~ through them--not alt-tab.

Cheers.

Jeff
  • 325
  • 3
  • 11
1

The Xcode source code editor allows you to choose the file from a list. It's two clicks instead of one (as it would be with tabbing), but it's better than nothing.

In addition, you can simply Alt-Tab through your open source code windows. This is not slower than tabbing, and has the same effect since the source code windows are usually placed exactly one in front of another.

vog
  • 23,517
  • 11
  • 59
  • 75
  • 2
    If by "Alt-Tab" you mean ⌘-` then this will indeed cycle through open windows. Alt-Tab is a Windows shortcut, and won't work in Xcode, at least not by default. (There's always key bindings, but window nav is a system-level shortcut.) – Quinn Taylor Jul 27 '09 at 04:27
1

You'll definitely want to read through this. (XCode Tips and Tricks you wish you know about two years ago - SO)

Community
  • 1
  • 1
Sneakyness
  • 5,305
  • 4
  • 33
  • 39
1

You can navigate between files using "Recent Files"

Write simple applescript:

tell application "Xcode"
    tell application "System Events"
        keystroke "1" using {control down} -- open "Related Files"
        key code 125 -- choose "Recent Files" ("keystroke down" doesn't work)
        keystroke return -- enter to "Recent Files"
        key code 125 -- choose previous file
    end tell
end tell

And bind it to some shortcut using for example FastScripts(free up to 10 bindings)

I have this script on "Control" + "`". (XCode 4)

Hope this will help

cody
  • 3,233
  • 1
  • 22
  • 25
0

You may also try an Xcode plugin I've just released - it's called Code Pilot and solves a lot of issues of Xcode's navigation, making it more TextMate/Eclipse-like.

Check it out here: http://macoscope.net/en/mac/codepilot/

I hope this helps!

kodz
  • 393
  • 3
  • 8
0

It is simple with XCode 7.2

GoTo View>>Show Tab Bar

This will show the tab bar.

RightClick on the New Tab and click -->"NEW TAB"

Then We can see all the files in tabs.

VARUN ISAC
  • 443
  • 3
  • 13