Always show project navigator when opening a new window in xcode? - xcode

Are there some options somewhere where I can set the defaults, like the project navigator to show when I open a new window in xcode.
I have dual screens and I often double click on a file so I can keep the current file open in a new window, while moving to a new file int he current window.
However I want that new window to have the navigation bar, which I always has to add.
Can I set this by default ?

Xcode offers a way to use custom key bindings to perform several actions. You can find them in the Preferences pane.
You could use these bindings to display Project navigation, toolbar and more right after opening a new window.
As you can see, I added a new action called "Display nav and toolbar", which is binded on "cmd + opt + ctrl + N".
Now every time I use this combination keys, Xcode will show Editor, Navigation, and toolbar for the key window.

Related

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 usability - Multiple screens

Is there a way to split Xcode interface when using multiple monitors?
I have 2 monitors but still haven't found an easy way to use it on more than 1 monitor (Storyboard on the left, code on the right) - Like you can do when using Intellij with Android - simple drag n drop of windows
Thanks for any tip,
Just right click on a file and Open in New Window
Go to File > New > Window
As detailed by Apple here
I actually found out just now after using XCode for several years.
You can configure how XCode responds to navigation/linked editors etc from the navigation tab in XCode Preferences.
I set "Optional Navigation" to "Uses Destination Chooser", which apparently was the missing link for using two monitors, since you can e.g. link the editor window with a storyboard view. I also set "Double click Navigation" to "Uses separate window". With these settings, the summary at the bottom looks like this:
- Click: Open in new window
- Option-click : Displays destination chooser
- Option-Shift-click: Opens in next editor
- Double-click: Open in new window

Xcode 5: disable single-click in navigation

So, after struggling with horrible interface choices of Xcode 4, I'm finally on 5.1.1.
The tabs became almost usable. Double clicking can be configured to open a file in a new tab. Good. Double clicking another file opens it in a new tab. Good. Double clicking first file again switches to previously open tab. Good! Double clicking first file while it is open in current tab opens a second tab with that file. Ok, I can live with that, since from there on they just switch from one to another.
So far a surprisingly sane behavior.
Unless you make a single click in the navigation panel by mistake. Single click opens whatever you click in the current tab, all logic and reason be damned.
The question is, how to change single click behavior to "Use separate tab" (or however Xcode refers to that behavior)?
Is there any way to disable single clicks from doing anything at all aside from highlighting the selection?
There's no option to disable the single-click behavior. Two options that get you close to your desired behavior are:
Use a single separate window for most of your tabs. Use a "main" window that has the file navigator visible, and a separate "work" window with the file navigator hidden. If you want to add a tab to the work window, create it in the main window and then drag it's tab over to the work window. This is an extra step, but you'll never have a single click change any of the tabs that you care about (thought it'll still change the primary or focussed editor in the main window, depending on your settings).
Use separate windows for each file. There's a preference setting that lets you create windows instead of tabs when you double-click a file in the file navigator. Use Mission Control instead of the tab bar to navigate between your files.

How do you open a TextMate tab in an another window?

I have two monitors on my system and sometimes I want to open a tab (i.e. file) from one window in its own window.
Is this possible?
You can't move a tab to a new window (yet? see this suggestion), but you can open a file in a new window from the drawer. Right-click the file in the drawer and choose "Open filename in New Window."
Find next is ⌘+G.
Find Next is Cmd-g. Moving a tab is View > Move to New Window. Exploring the menus would be a good idea.
Ignore me, confused editors (see comments).

Resources