Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

In xcode you can go back and forth in your program by swiping the mouse.

Is there an additional keyboard shortcut for that?

In visual studio 2010, for example, you do so by Ctrl - and Ctrl Shift -

How do you that in xcode with the keyboard?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Yes. The keys in Visual Studio 2010 that you refer to (for others that are unaware) are known as "Navigate Backward" and "Navigate Forward" and work as described in the the following Microsoft Blog allowing you to quickly move back and forward between places you’ve already been in your code, via a "Jump to Definiton" in Xcode, for example.

The equivalent keyboard shortcuts in Xcode 4 are:

Navigate Backward:

Ctrl + + Left Cursor

Navigate Forward:

Ctrl + + Right Cursor

share|improve this answer
    
How do you make that cool ⌘ sign anyway? –  Jim Thio May 29 '12 at 9:19
    
+1 selected as the answer. –  Jim Thio May 29 '12 at 9:20
    
@JimThio Personally, I just use the Character Viewer and drag them in from there. You can enable it on the menubar by checking System Preferences -> Keyboard -> "Show Keyboard & Character Viewers in menu bar". There are also some good tips on using the keyboard characters in this meta answer –  binarybob May 29 '12 at 10:51
    
I'm wondering why "Ctrl + Apple + Left Cursor" works for me when the menu button says the shortcut is "fn + Left Cursor". Why does "fn" = "Ctrl + Apple" instead of just being the "fn" key? –  Marty Sep 11 '12 at 1:26
    
@Marty Where are you seeing this? Under the "Navigate" menu in Xcode, on my Macbook, the "Go Back" and "Go Forward" menu items have shortcuts as I've described. –  binarybob Sep 11 '12 at 9:36

Are you talking about -tab? This switches you between applications. It is similar to alt-tab in Windows. You can also press -` to switch between windows in the same application.

share|improve this answer
    
Not really but +1 for effort. –  Jim Thio May 29 '12 at 9:19

I was searching for this for so long time and what works for me is:

⌃ + 2 (Ctrl + 2 - Shows previous history) then click ↓ - this will jump back to previous definition

⌃ + 3 (Ctrl + 3 - Shows next history) then click ↓ - this will jump to next definition

This will only work if you navigate through your class using ⌃ + 6 to jump between definitions.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.