tags:

views:

85

answers:

4

Hi,

I have .h (e.g. A.h) file open in XCode, is there a quick way to open the corresponding .cc/.cpp (e.g. A.cpp) file?

+6  A: 

optionKey-appleKey-arrowUp

This works both with .h and .m objective-c files and .h and .cpp/.cc files

stefanB
does anyone know why apple seems to insist on making shortcuts take two hands?
Dolphin
I'm guessing that's just keyboard layout and it is difficult to press 3 keys with one hand (except 3 finger salute on desktop keyboard)
stefanB
A: 

Option-Cmd-UpArrow switches between implementation (.c/.m/.cpp/.mm) and header (.h/.hh) files.

Barry Wark
A: 

Same answer but in symbols

⌥ + ⌘ + ↑

Abizern
A: 

the preceding answers are basically correct, assuming that one is using the default XCode Key-bindings...

to change the shortcut: xcode preferences->Key Bindings-> View-> "Switch to Header/Source File"

I prefer to use ⌘§

kent