Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode assistant editor doesn't show my .h and my related .cpp file

Tags:

c++

xcode

If I create .cpp file from xcode, it will create .h file for me automatically, and I will be able to view two files together in Assistant Editor. It will show .h file relate to .cpp file right next to each other.

However, I create my project from TextMate and import those files manually. Now, when I click .h file it won't show the related cpp file right next to it. How can I make that happen.

Thanks

like image 994
toy Avatar asked Jul 02 '11 21:07

toy


People also ask

How do I show my assistant in Xcode?

The Assistant Editor is harder to find as of Xcode 11 even though it is incredibly useful. Press Control + Option + Command + Return to show the Assistant Editor on the right.

How do I add assistant editor in Xcode?

You can open the editor from the Xcode menu Editor -> Assisant . Nowadays, the Assistant Editor is more seen as just a second editor next to the primary editor.

How does Xcode choose assistant?

Press the Alt key and the file will open in the Assistant Editor Window.

How do I open the assistant editor in Xcode 12?

You can open the 'Assistant Editor' in Xcode by clicking the button with two circles in the top right, or via View > Assistant Editor > Show Assistant Editor.


1 Answers

Hmmm.. I tried to recreate your problem, but it worked for me.

I have two thoughts:

1) Are you sure they are named the same thing? If not, it doesn't seem to consider them counterparts. 2) When you've switched to the Assistant Editor, to the right of the back/forward buttons is a dropdown menu to select which file to display. This should be set to "Counterparts" in order to get it to auto-display the correct counterpart.

If you have this set to manual, you can set it to maintain a certain file on the side.

Hope this helps!

like image 171
NHDaly Avatar answered Sep 22 '22 22:09

NHDaly