Xcode 11.5 Assistant editor show any file - xcode

I want to be able to open any file in the assistant editor. Right now it is forcing me to open "counterparts", "test classes" and other stuff that i dont need.
I need two different classes to look at.
In previous xcodes it was possible
Where is this option in Xcode 11?

You can either alt + click in the file navigator to open in a new editor, or click this icon:
(pro tip: hold alt to toggle new editor position [on right | below])
Also, alt + click on a file while more than one editors are open will open the file in the non focused one.
Finally, ctrl + alt + cmd + click on a symbol will open that symbol in a new editor (or to the secondary if you got more than one).
Bonus: alt + enter on a quick open result (cmd + shift + O) will save you the trip to the file navigator.

Don't use the assitant editor, simply click on the "+" icon in the top right
"Add editor on right"

Related

Xcode 11 how to use editor and assistant editor

In Xcode 10 I used the shortcut cmd + alt to open a second editor and cmd + return to close the second one.
In Xcode 11 I can open a second editor using cmd + alt but cmd + return is not working.
Clicking Show Editor Only isn't working as well.
What am I missing?
Thanks
Look 2 menu items further down.
To open and close a second editor you can press ⌃⌥⌘↩

xcode 11 Close secondary editor shortcut

Is there a shortcut to close all other editors except focused one?
Previously I would open a file with option so it would show as a second editor. When I was done with the second editor, I would "close" it by using show editor only (command + return). With xcode 11, the second editor isn't part of the assistant editor. So, I can't "close" it with show editor only.
In simple terms.. Is there a shortcut to close the right editor and only show the left one.
I think SHIFT+CONTROL+CMD+RETURN is exactly what you are looking for (Note: you should be "focused" on left editor to close right).
Helpful link about new Xcode 11 assistant editor behavior:
https://www.avanderlee.com/xcode/xcode-assistant-editor/
The shortcut to close the current active editor is:
ctrl + ⌥ option + ⌘ command + W
This answer contains many more options

Xcode 9 Jump to definition in a new tab, window, or other navigation area with Option-Shift-Command+Click

Xcode 9 seems to be missing jump to definition shortcut Option-Shift-Command+Click. You used to be able to use to open definition in a new tab, window, or other navigation areas with Option-Shift-Command+Click. In Xcode 9 this still works from the file navigator but not when you use this on a class. Has anyone been able to figure out how to use this shortcut in xcode 9?
You can use Xcode preferences to personalise the double click and the action selector.
From this window you can change CMD + click to open the definition instead of the action selector (as it was in Xcode 8)
you can also change the behaviour of optional navigation, so that it opens a tab
By setting the configuration as shown below, you can CMD + ALT + click to jump to definition in a new tab.
This also restores Option-Shift-Command+Click to show the window selector as you wanted
Marco's screenshot was helpful.
The keyboard commands for Xcode 9 have changed:
Jump to Definition
Same window : Command-Control-click (was Command-double-click)
In assistant pane : Command-Option-Control-click
In separate window/pane : Command-Option-Control-Shift-click
Quick Help
Option-click (same as Xcode 8)
As soon as I asked a question I found a solution by accident.
Command + click on the class to bring up the new action selector
Shift + Alt + Click to chose where to open (tab, new window, etc)
Alternatively, can use Command + Option + Control + Shift to do this all at once but I'm not sure how convenient that is
First, Open the file.
Then:
New Window : Cmd + Shift + t
The Assistance Editor : Cmd + t

Xcode: Is it possible to 'Open Quickly' the right pane of the Assistant Editor?

Is it possible to 'Open Quickly' in the right pane of the Assistant Editor? This would increase productivity by like 20x
Yes it's possible, but depending on your Xcode version you may need to adjust the default behavior in Xcode's preferences.
Use ⌘ command+⇧ shift+O to open the "Open Quicky" input box, and then:
Use ⌥ option+Enter to open the file in the right editor.
Use ⌥ option+Shift+Enter to select where you want to open the file using the arrow keys.
On Xcode 12, the default action of ⌥ option+Enter is to open the file in a new "Tab" (which are new in this release, and different from a "Window Tab"). This is still configurable in the preferences.
On Xcode 11, you can split the editor as much as you want. This means ⌥ option+Enter by default will open the file in the editor next to where your cursor currently is.
This behavior is configurable in Xcode's Preferences, under Navigation:
To have ⌥ option+Enter open the selected file in the editor on the right of the Xcode window, select "Optional Navigation: Uses Second Editor".
Make sure that Uses Focused Editor is selected in Preferences > Navigation:
This way, you can open it by focusing the Assistant Editor, pressing ⌘ command+⇧ shift+O to open the Open Quicky input box, and just press Enter to open the selected file, instead of ⌥ alt+Enter.
An even easier way is to hold down the Option key and then click on the file. That will bring open the chosen file in the Assistant Editor. This works great when you TDD your Swift :) You can have your tests on the left and option click on the implementation to open on the right.
Cool thing!
Just to extend the answer you can switch between more then two Tabs or open it new editor tab cool isn't it?
• Open multiple assistant editor .
• ⌘ command+⇧ shift+O.
• Hold ⌥ option and press Enter on the selected item.(Used to open any file in Assistant Editor)
• You can also use ⌥ option+⇧ shift+Enter to toggle more and
open new tab if you're not on stacked editor.
• The multiple selection window will appear
Note: Make sure you have all editor stacked selected
In addition to Guillaume's answer, be mindful that the editor is not in the single editor mode (I don't know what it should be called officially though) that you can disable by selecting this button, otherwise all navigations become "Uses Focused Editor":
EDIT: misread your question above answer is good, just make sure you click into that pane before trying those commands
Sounds like your looking for some hotkeys, check here for a full list
http://spin.atomicobject.com/2014/03/23/xcode-keyboard-shortcuts/
http://iphonedev.tv/blog/2014/9/15/14-xcode-time-saving-shortcuts-memorize-and-improve-your-productivity
http://nshipster.com/xcode-key-bindings-and-gestures/
but to open assistant editor use ⌘ command + ⌥ option + ↵ return

interface/implementation files shows up in new windows

I`m using "All in one" layout.
When I press cmd + opt + up arrow interface/implementation files are switched in new window. How to do in current window ?
Open Preferences (Xcode > Preferences from the menu) and on the General pane, under Editing, check off Open counterparts in same editor.

Resources