Xcode window positions when switching from dual to single monitor - xcode

When I'm working at home I plug my MacBook in to my 20" monitor as a second (right side) monitor. I do all my editing in Xcode on the larger monitor, and leave the menu bar, debugging and documentation on the laptop's monitor.
The problem is when I disconnect from the second monitor and want to work on code in "laptop" mode. Now, whenever I open a file for editing, it shows up almost entirely off the screen and I have to drag it over to edit it. I understand (sort of) why this is happening, since I last had it open in a different monitor. What I'd like to do is reset the window positions in Xcode so the edit windows show up completely on the laptop monitor. Any ideas on how to do this?
I'd even be willing to nuke entries out of the preferences (or set up an applescript to do it) but the xcode plist is inscrutable to me.

Right click the project in finder, select show package contents, and delete the two username.* files. Its not automated... but it works.
Additionally if your using some kind of version control system you probably want to add username.* to your ignore pattern.

Related

How does one disable the file menu animation in MacOS when selecting a command?

When you open the file menu (or any other menu in the menu bar), it looks something like the attached image.
MacOS file menu
In Windows, when you select the command you want, the menu instantly disappears and the action is instantly performed. In MacOS, however, the command you chose blinks, the window fades out, and then the action is performed.
I know there are commands and settings to disable certain animations in MacOS, but I can't seem to find one relating to this yet.
This is one of my major pet peeves with MacOS and I'd appreciate any help. It might be the case that I'm making a huge deal out of this when it's not as such, but it does get annoying sometimes and slows down my workflow.
Thanks!

Is there a way to use PyCharm on multiple monitors

I'm using PyCharm with multiple monitors on Mac OSX (10.10.5), normally you can drag windows off to a separate monitor. In PyCharm that works, but they (and in particular the Run window) snap back to the main monitor.
I've only seen this on the latest PyCharm 5 CE though its possible older versions also had the problem. I've searched all the settings and searched online, but can't find a setting that makes the window stay where it was placed.
Right click on the tab and select View Mode as Window.
Then you can move the window to another monitor.
It's crappy behaviour from the best python IDE out there.
There is a OSX solution but i'm not sure if you will like it:
You can enable old style multiple screen support again in OSX by going to System Preferences, Mission Control and uncheck "Displays have separate spaces". Now your floating windows will not snap back and you can even extend your PyCharm main window over the screens.
The downside of this solution is that you'll have the OSX dock and main menu only on your main monitor. I hope Jetbrains will fix this behaviour soon.
Another way to achieve what you want is to open multiple instances of the project. When you try to open the project for the second time you can choose "open project in new window". You can drag the new window to the second screen; it won't snap back to your primary monitor.
For Ubuntu and Windows users landing up here:
Press Shift + F4 or
Right-click and select 'Move Tab to New Window'
Drag the newly created window to the next screen
The best option is to detach an editor window and drag it to your second monitor.

Is there a way to undock the assistant editor in Xcode into its own window or onto a second monitor

Is it possible to have one assistant editor (on my second monitor for example) which always shows the counterpart to the file which I am currently editing (on my first monitor)?
I can create a new tab, drag it out into its own window and show the assistant editor but of course it doesn't show the counterpart to the file I am editing on my primary window/monitor.
Is there any way to make it do this?
No there isn't. But you can always send feedback to apple regarding what you'd like to see in future updates. If this request comes from many devs, maybe there is a chance to see it added to xcode.
Agreed. With the focus on multi-monitor support this is a feature that has been missing.
In Xcode 7.3, I just double click a file in the Project Navigator view and a new editor window with the file is opened.

Tabbing between Xcode project windows?

Basically I am supposed to press Command + the [`~] button that is above the Tab.
This question has been answered twice here:
Tabbing between Xcode projects?
and
Navigate Between Projects in XCode 4.0
But it just wont work for me, has anything changed in the xcode versions? or the way the mac behaves?
When I press this combination all I hear is the "invalid" sound.
I am using the newest Mac OS mountain lion.
Sorry if this belong to the super user stack overflow I just figured more Xcode users would be found here.
I can do the swipe on the mouse pad to bring the screen where I see all the active windows for the current application... but this is much slower than just tabbing between the 2 projects I'm usually working with.
Thanks
Do I infer from your comment about using the three finger swipe (for Mission Control) that the second window is not on the same desktop as the other windows? The command+` sequence only jumps between windows on the same desktop, not between different desktops (which is not to be confused with two physical monitors, which you can jump between, if you have multiple monitors hooked up to your computer).
The inability of command+` to not jump between desktops is a little curious, because command+tab, which jumps between apps, does go across desktops. If you want to jump between desktops, you can press control+1 or control+2 to jump to desktop 1 or 2, respectively. It should be noted, though, that while that might be a good alternative when trying to jump between your two desktops, though it admittedly selects the last active window in that other desktop, not necessarily a window from your current app in that other desktop. Also control+left and control+right let you jump between desktops, too.
This is a Mac OS "feature", not an Xcode issue, I believe. The command+` ability to jump between windows (but not windows across Mission Control desktops) is the same behavior across the Mac OS.
Update:
If this keyboard shortcut is not working at all, in any app, even within a single Mission Control desktop, then you don't need to worry about Xcode settings, but rather focus your attention on the keyboard settings:
You might want to look at your "Move focus to the next window" keyboard shortcut. There have been reported problems of people with international keyboards not getting this to work properly, but by clicking on (and thereby selecting) the command+` graphic, you can try using different keyboard shortcut, and see if that does it for you.
I have mountain lion as far as i know.
How about this?
control + down
You'll get the current application windows.
Below them there should be a horizontal list of recent projects for Xcode (both opened and closed). With arrows left or right choose the project (it should be highlighted with blue) and press enter.

Xcode window organization tips?

I'm a fairly recent convert to Xcode and OS X. Even though I have two large monitors it feels likes I spend far to much time hunting for windows.
I typically have at least the following windows open:
The file I'm editing.
A matching header file.
Another source file.
API Documentation.
A browser window.
It seems like whatever I want next is always underneath something else. There are lots of ways to switch windows (e.g., Exposé, Spaces, OS X hotkeys, Xcode hotkeys), but that's part of the problem. There are so many different approaches, I can't blindly use one; I have to think about which is the right one for each situation.
How do you organize your Xcode windows so you aren't switching all the time?
Or, how do you effectively switch between windows?
I prefer all-in-one layout (Xcode's preferences->General). If I need to look at several files simultaneously, I split the editor view (the little button above the vertical scroller). I also constantly use Cmd-Option-UpArrow to switch between .h and .m files. The only other window I have is the documentation browser.
I have a dedicated Space for Xcode so that I can switch between Xcode and Safari with a shortcut.
Xcode is unbelievably customizable, though many options are well hidden.
I keep the main XCode window open and the documentation open slightly askew from each other horizontally so i can click one while the other is on top. I use the button (right next to the lock icon) which opens the associated file to toggle in-betweeen the h and m files.
I use expose and keep safari in another panel.

Resources