interface/implementation files shows up in new windows - xcode

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.

Related

Xcode 12 won't allow ⌘⌥← / ⌘⌥→ shortcuts for "Show Previous Tab" / "Show Next Tab"

I am trying to customize the Xcode 12.2 keyboard shortcuts for "Show Previous Tab" and "Show Next Tab". These are the new document tabs that were introduced in Xcode 12, as opposed to the old window tabs. (The document tab bar is below the window tab bar.)
When I go to Preferences > Key Bindings, and try to record shortcuts for "Show Previous Tab" and "Show Next Tab", the settings panel records ⌘⌥← as ⌘← and ⌘⌥→ as ⌘→. Basically, the option key disappears.
This is a problem only for those two shortcuts. If I try to customize "Show Previous Window Tab" and "Show Next Window Tab", I can record ⌘⌥← / ⌘⌥→ just fine.
Previously, I used System Preferences > Keyboard > Shortcuts > App Shortcuts to customize "Show Previous Tab" / "Show Next Tab" for "All Applications". I removed this, and it still didn't fix this issue in Xcode.
What you want is to change Navigation Style to "Open in Place" in the Xcode preferences. Then the whole silly tabs in tabs thing will go away and you can go back to just using App shortcuts like you used to.
For the record, I previously used shortcuts defined in Xcode, where it actually was possible to define option as a part of a shortcut for Show next and show previous tab, but had to go with App shortcuts now due to the behaviour you describe.
This is the article where I found the above info: https://www.jessesquires.com/blog/2020/07/24/how-to-fix-the-incomprehensible-tabs-in-xcode-12/
TL;DR: I had to use the system preferences -> keyboard -> shortcuts and set all four of these shortcuts. Which had a weird lag when it was setting them.
Show Previous Tab
Show Next Tab
Previous Window Tab
Next Window Tab
Long version: I tried the below first which should be the correct answer but it didn't work for me. Please let me know if it works for you.
I wish this worked because it looks like it would be awesome.
XCode -> Preferences -> Key Bindings
Use the the search Filter on the right side to search for:
Show Previous Tab
Show Next Tab
Previous Window Tab
Next Window Tab

Xcode 11.5 Assistant editor show any file

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"

Opening a file in a new window in macOS?

Pretty much what the title says.
I would like when I use File -> Open or Cmd + O to open a file/directory, Atom would open it in a new Atom editor window not in a new tab inside the existing editor window.
Thanks in advance!
If you want to open a file in a new window using Atom in a mac, at most you can deactivate the option "Always Show Tab Bar" in Settings > Packages > tabs AND open the window before opening a file:
You can think a "window" as a "projects" container.. so when you just open a file is like you are opening it in the current project for this reason you will see it in a new tab inside the window.
In this way is like you are opening a one-file project, hidding his single tab bar.
The result:
If you need to switch to another file in the same path or close you can just open the "tree view" (cmd+):

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

Xcode - open current file in a NEW window (a real challenge !)

Say you have File.m showing in the blue area above.
I want File.m to open in a new separate window.
How to do this??
Note that - of course - IF you have the ProjectNavigator showing and IF you can see the filename "File.m", then double-click on the filename and it will open in a new window.
What I want to do is open ANOTHER copy of the "CURRENT" file (the one in the primaryEditor) in a NEW WINDOW - without touching the ProjectNavigator.
Any ideas? Cheers
Note that ... (an excellent page here)
http://realmacsoftware.com/blog/xcode-4-s-less-obvious-shortcuts
if you click on whatever file is in the current primaryEditor, then shift option apple comma that will indeed open the following "freaky little-known Xcode popup" ...
you can then, indeed, choose to open a new window. (So to be clear, that is exactly what I want to do.)
So, I want to be able to do that in one step. Cheers!
In XCode's Preferences you can change the following:
And then right-click within the primary editor and click "Open in Separate Window"
Edit:
Instead of right clicking in the primary editor you can simply type command+option+, (comma)
Open the file what you want to open in the NEW window.
Command + Shift + t
Open the file what you want to open in the separated window.
Command + Option + ,
I wrote a new automator service that does the following steps in Xcode:
Execute the default shortcut for the "Open in..." menu item (Command-O)
(if this isn't your current "Open in" shortcut, the workflow will not work. If you still want to test it, just changed your default shortcut :) )
Go all the way to the left in the weird "Open in" view
hit Enter
Current file opened in new window
The only thing you need to do is install the service on osx and map a shortcut to it.
Here a download to the service:
https://www.dropbox.com/s/486t2iz17o0l9dh/Open-New-Window.zip
INSTALL INSTRUCTIONS
1.Place Service file in folder ~/Library/Services
2. Open "System preferences"
3. > Keyboard
4. > Tab "ShortCuts" > "Service" > "General"
5. > Set your own shortcut for the service
6. Go to XCode and test the service by using your very own shortcut
Tested on OS X Mavericks, Xcode 5.0.1
In XCode 4 you can have a split window via View -> Show Assistant Editor. Then choose the same file which you have already opened in the Primary editor by the small right arrows on top of Assistant Editor.
Thanks
in the ProjectNavigator. If you see the file name: Double click on the file name. It will open in a new window.

Resources