109

In Xcode 10, the toolbar had an inter-locking ring icon which showed the assistant editor, it's missing in Xcode 11.

Xcode 10

Xcode 11

Hackman
  • 2,629
  • 3
  • 18
  • 24

8 Answers8

136

In Xcode 10, the toolbar had an inter-locking ring icon which showed the assistant editor, it's missing in Xcode 11.

The interface has changed a little, but the functionality is still there. The top right corner of the editor pane has two buttons:

top right corner of Xcode text editor pane

Clicking the left button, which looks like lines of text, displays the popup menu, where you can choose various editor configuration options. Clicking the right button just narrows the existing editor and adds another one next to it.

Some of the same options are also available in the Editor menu in the main menu bar.


Update: This is from the Xcode 11 beta release notes, and perhaps more fully explains why the UI was changed:

Editors can be added to any window without needing the Assistant Editor. Editors are added using the “Add Editor” button in the jump bar or the File > New > Editor command. Each editor can now be in one of three modes: “Editor Only”, “Editor and Assistant” or “Editor and Canvas”. The latter two modes automatically show relevant content when available. When using multiple editors, the View > Editor > Focus command can be used to temporarily expand the active editor to fill the entire window, hiding other editors. For source control support, the Code Review button in the Toolbar replaces the Comparison Editor. The “Show Authors” command is now available from the Source Editor’s Editor menu. The SCM Log is now in the Inspector Area. (43806898)

With multiple editors possible in a window, you need editor-specific controls for showing the ancillary views like the assistant editor, author view, etc.


From SMGreenfield's comment:

Sometimes I want to look at a different part of the same darn document. There has always been a way to do this, but it involved jumping through hoops.

Just add another editor: click the Add Editor button in the upper right corner of the editor, or choose File > New > Editor. The new editor will default to showing the same file you were working on in the existing editor.

If new editors show up on the right of the existing editor and you'd prefer them to stack vertically, you can choose View > Change Editor Orientation. If you want them to stack horizontally most of the time (the default) but just want one to show up below, choose File > New > Editor Below.

Caleb
  • 124,013
  • 19
  • 183
  • 272
  • 87
    I can't be the only one that hates this change. – Jan Erik Schlorf Aug 29 '19 at 08:19
  • 1
    How can you open a file in the Assistant Editor? I used to Option click on the file in the Project navigator. Cannot find a way to do this in Xcode 11.0 – balazs630 Sep 21 '19 at 17:50
  • @balazs630 The content of an assistant editor changes automatically depending on what's in the associated editor, and how you have the assistant configured. For example, if you have the assistant set to "counterpart" and you open a `.m` file in the editor, the assistant shows the corresponding `.h` file. If you just want to open an arbitrary file, use a 'separate editor' or 'next editor' for that. Look at Preferences->Navigation->Optional Navigation for a list of choices, none of which are exactly what XC10 did. Next editor is a pretty similar option if you usually have two editors open. – Caleb Sep 21 '19 at 18:42
  • 1
    How about just SPLITTING the friggin' window? Sometimes I want to look at a different part of the same darn document. There has always been a way to do this, but it involved jumping through hoops. – SMGreenfield Oct 02 '19 at 22:33
  • @SMGreenfield It's easy to get that effect by adding an editor — see the edit at the end of my answer. – Caleb Oct 03 '19 at 03:03
  • @Caleb -- thanks -- I'll try it once I start using Xcode 11 (I'm presently using Xcode 10.3). However -- the knock on Xcode 11.0 is it's not ready for prime time yet -- so I might wait until 11.1. – SMGreenfield Oct 04 '19 at 21:17
  • How the hell do you simply show the version comparison editor? – Alex Zavatone Dec 13 '19 at 17:11
  • 1
    @AlexZavatone There's a button with opposing arrows and a tooltip that says "Show or hide Code Review." (See the pic above.) Click that. – Caleb Dec 15 '19 at 04:55
  • @AlexZavatone I don't care what they call it as long as it works, and so far it’s been working very well for me. – Caleb Dec 15 '19 at 18:41
  • I don't think Xcode is ever ready for prime time. Apple doesn't care about developers, though, and no one uses Xcode because they want to. – Andrew Koster Feb 29 '20 at 17:25
41

Shortcuts :

  • control + option + command + return : Show Assistant Editor
  • command + return : Show Editor only (hide Assistant Editor)

Using Editor on the Toolbar

enter image description here

Hackman
  • 2,629
  • 3
  • 18
  • 24
  • 2
    Shortcuts are always better when it comes to Xcode. Thanks! – iHarshil Oct 24 '19 at 06:14
  • Careful with `control+option+command+return`: I had pressed it because another website said it removes the extra editors (which it did, but that's not technically what the user of it is). Later when I was in Xcode, it would NOT allow me to add any editors. All options were disabled to add more editors and I was getting annoyed. Until just now I realized pressing that shortcut disables them. – Hedylove Nov 05 '19 at 18:13
10

It has moved, to show it click on icon with horizontal lines and select Assistant. enter image description here

Mike Zriel
  • 1,575
  • 1
  • 17
  • 28
2

In Xcode 11 we now have multiple editor panes. You can summon a second pane, a third pane, as many as you like.

When you have a second pane, it does not have to be an automatic assistant. In other words, the editor pane itself either is an assistant or it is not. So if it is not, it is manual. And if it is, it is automatic.

To toggle between being an assistant and being an ordinary pane, choose Assistant from the Editor menu:

  • If Assistant is checked, this is an assistant and is automatic. What it displays depends automatically on some other pane.

  • If Assistant is unchecked, this is an ordinary editor pane and is manual. You can display anything you like in this editor.

matt
  • 515,959
  • 87
  • 875
  • 1,141
2

In case you can't use Add Editor button just use shortcut: Cmd + Ctrl + Shift + Enter

janaz
  • 673
  • 5
  • 12
2

Turn Assistant on by navigating to the following in Xcode 11:-

Xcode > Editor > Assistant

Screenshot

bikram
  • 7,127
  • 2
  • 51
  • 63
0

For Xcode 11.2.1

command + option + return

or

Main Menu -> Editor -> Line View

J. Goce
  • 279
  • 3
  • 10
0

it is worth noting, that you can also open the assistant editor by alt-clicking the file

bdskfsdk321dsad3
  • 113
  • 1
  • 2
  • 9