Jumping to counterpart files in Xcode 4.1

I upgraded my MacBook Pro today to the new Lion version of the OSX operating system. After downloading and installing Lion, I was forced to upgrade Xcode from version 4 to 4.1. It took quite a while to complete. After everything was updated I fired up Xcode 4.1 to kick the tires.

Much to my dismay, I found that the “Jump to next/previous counterpart” command that I constantly use can no longer be performed via the trackpad. In Xcode 4 I would use a three-finger vertical swipe to move between header (.h) and implementation (.m) files, roughly 56,000 times per coding session. That command no longer can be performed with that super-convenient gesture. I can’t imagine why Apple decided to remove support for that gesture. I can’t find a way to re-enable it, either.

Fortunately, the “Jump to next/previous counterpart” feature was not entirely removed. You can still access it via the Navigate menu, or using the default key bindings of Control+Command+UpArrow and Control+Command+DownArrow.

On a similar note, navigating back and forth between files that you’ve viewed is no longer available via the trackpad (via three-finger horizontal swipes). Instead use Control+Command+LeftArrow to go back in the navigation history, and Control+Command+RightArrow to go forward in it.

Those are the default key bindings. If you would like to customize them, open the Xcode menu item, then click the Preferences… item. In the window that opens, click the Key Bindings button and scroll down to the commands you would like to map to different keys.

If you know how to re-enable the trackpad gestures, please let me know!

About Josh Smith

Josh Smith is a musician at heart, and a software developer by obsession. He lives in Arizona, plays classical music on the piano, jazz on the guitar, and enjoys brutally long rides on his bicycle. He has a wonderful wife and thinks that, in general, life is good.
This entry was posted in Xcode 4. Bookmark the permalink.

6 Responses to Jumping to counterpart files in Xcode 4.1

  1. Erik Dungan says:

    Actually, it was just changed to a 2 finger swipe to the left and right. See:

    http://stackoverflow.com/questions/6819398/xcode-4-1-multi-touch-gestures-changed

    • Josh Smith says:

      Thanks. For me, that two-finger swipe navigates the history of files I’ve visited. That doesn’t go to counterpart for me, unless the previous file I visited was the counterpart of the current file. :-\

  2. The three finger history swipe is still available, ITS JUST FRICKIN’ BACKWARDS! swipe right to go BACK in history. I don’t know what the heck is up with 4.1, like if its an accident or maybe its better and I just need to get the hang of it, but I’m pretty annoyed right now.

    • Josh Smith says:

      The change in swipe support, and the fact that the Analyze feature reports lots of false positives now, has me not loving Xcode 4.1 yet. Feels like a step backwards.

  3. Robert says:

    Did you even find a solution to this problem? If not, have you looked into a 3rd party application that allows you to customize gestures (either globally or on a per application basis)? They allow you to map keystrokes or key combinations to whatever gesture you choose. I use one called BetterTouchTool, and I’ve been really happy with it.

    • Josh Smith says:

      Robert,
      I didn’t find a solution that allows for the three-finger swipe. I haven’t tried any third party apps either.
      Josh

Comments are closed.