What is the shortcut key to always open a file on the left / right pane in Xcode? - xcode

In earlier versions of Xcode, I could consistently open a file either in the left or right window depending on whether I press alt / option when I click on the file.
In the current version (13.0), depending on which is the currently "active" pane, pressing alt/option and clicking causes a file to be opened in the other pane, meaning sometimes it opens on the right, and other times on the left, depending on which pane was originally active.
Is there a shortcut key, so that I can always open a file in the right pane, or left pane, regardless of which is the active pane ?

Thanks to https://betterprogramming.pub/mastering-the-assistant-editor-in-xcode-11-4c26bdcd673 I have found the way :
Just go to preferences -> Navigation and change the settings to use primary editor instead of focused 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

How to navigate vscode save changes before closing dialog without using mouse?

In macOS vscode, when I close a file that has some changes made to it, I get a dialog on top. How do i navigate the buttons here with just my keyboard?
The screenshot doesn't show it but it defaults to the Save button.
I don't know if VS Code follows normal Mac conventions but, if it does, Return should select the default button (Save, presumably); Escape should cancel; and Command-D or possibly Command-Delete should select Don't Save.
Also, if you have System Preferences > Keyboard > Shortcuts > Full Keyboard Access set to "All controls", the Tab key should move focus among the buttons and Space will press the one with focus. If you don't normally have that set that way, Control-F7 will toggle it on.

Show Assistant Editor missing in Xcode 11?

In Xcode 10, the toolbar had an inter-locking ring icon which showed the assistant editor, it's missing in Xcode 11.
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:
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.
Shortcuts :
control + option + command + return : Show Assistant Editor
command + return : Show Editor only (hide Assistant Editor)
Using Editor on the Toolbar
It has moved, to show it click on icon with horizontal lines and select Assistant.
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.
In case you can't use Add Editor button just use shortcut:
Cmd + Ctrl + Shift + Enter
Turn Assistant on by navigating to the following in Xcode 11:-
Xcode > Editor > Assistant
For Xcode 11.2.1
command + option + return
or
Main Menu -> Editor -> Line View
it is worth noting, that you can also open the assistant editor by alt-clicking the file

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

'Property pages' tab is missing in VS2010

On the right of VS2010, there is normally a group of tabs, like the solution explorer and the property pages tab. It seems that the tab to access the property pages is missing.. How can I get it back? This must be easy.
The tabs will only appear if more than one window is docked at the same spot. If you don't see them then you either have undocked the window or closed them. Closing be the more likely case here, use the View menu to get them back. Or Windows + Reset Window Layout if you're completely lost.
Click on the Project name in the Solution Explorer and then press F4. The Properties window/tab should now appear.
Note that this Properties tab is different than the one shown if you right click the project name and then click "Properties."
Under View Dropdown menu, should be there.
Or right click on the app in design mode and click properties.
Close your visual studio and open the Visual Studio Command Prompt (from window Start -> Programs -> Visual Studio XXXX -> Visual Studio XXXX Tools) and enter "devenv /setup".
If you want to dock one below the other it's a two step operation. You need to start with the two windows not connected together at all.
1) dock the first window on the right hand side of the application. This should fill all of the vertical space available.
2) make sure the second window is floating then drag it towards the first. When the arrows appear move the mouse over the down arrow and the second window should snap below the first.

Resources