Control-Command-Up not switching to counterpart file in Xcode on Lion. - xcode

Since the three finger swipe has been stolen in Lion, I find myself forced to resort to the keyboard to switch between .h and .m files. Two finger swipe left and right only seems to work infrequently, and that should be for scrolling anyways.
The keyboard command should be Control-Command-Up, but for some reason this takes me out of Xcode and shows the project file in Finder.
I have checked both System Preferences, and Xcode's key bindings settings, and I can't find anything wrong. Xcode is set properly, and I can't find any conflicts.

Do you by any chance have another program such as Afloat installed that might be taking over the key combination? For instance, Afloat uses the Control-Command-Up key combo to do just what you described - show the open application's file in Finder.
Besides changing the key combo, the Xcode default Control-Command-Down will also switch to the counterpart.

I think it's a bug. For now I assigned another key combination: ^Q and ^Z to "jump to counterpart" and it works.

Related

How to solve XCode swipe gesture to go to previous / next file freeze editor?

Since this morning I'm facing a really annoying bug in XCode 5 on Mavericks :
I'm heavily used to swipe from left to right with two fingers on the MacBook trackpad to go to the XCode editor previous / next files.
BUT, now, doing this totally freeze the editor after having just moved for something like 5 px.
After that I have to close XCode and reopen it to make the editor work again.
Pressing the previous / next button works wel since it doesn't trigger this buggy animation.
Did anyone had this problem before or has any clue to solve it ?
In fact this problem is affecting other swipe gesture like the previous / next swipe in Safari.
I found a way to fix this on Apple Support Forum, by resetting the NVRAM.
Shut down your Mac.
Locate the following keys on the keyboard: cmd ⌘alt ⌥PR. You will need to hold these keys down simultaneously in next step.
Turn on the computer and immediately press and hold the cmd ⌘alt ⌥PR keys before the gray screen appears.
Hold the keys down until the computer restarts and you hear the startup sound for the second time.
Release the keys.
When your Mac finishes starting up, you might want to open System Preferences and adjust settings that have been reset, such as sound volume, display resolution, startup disk selection, or time zone.
Apple support: https://support.apple.com/en-us/HT204063
For me, in Xcode 8.3.3 and Xcode 9, it started working after
Go to the system preferences
Go to Trackpad
Select and deselect "Tap to click"

Keyboard events don't work with irrlicht on Xcode

When I run my Irrlicht application in Xcode, I can't use keyboard input:
If I press a key while the application is running, I end up writing that letter on whichever window was opened before the application, for example: I'm editing my code, than I press Build/run, the application opens (I press with the mouse on the window just to make sure it is focused) and than I press a key and that letter is written in the editor window...
I am certain the problem is not from the code, because if I press the top bar of the application's window, press the key, and release the mouse button (in a fast motion) the event gets fired..
Now, from what I read in this link (fourth post), it seems there's an incompatibility between command-line application with Xcode and irrlicht. The guy changed to a Cocoa application and got it to work. I don't know how to do this, since Irrlicht uses lots of namespaces and with cocoa I get loads of problems with it..
Any idea? thanks!
Well after a random search i found this guide:
http://irrlicht.sourceforge.net/forum/viewtopic.php?f=5&t=13890&start=60
Some things were different with my Xcode 3.2.6 (e.g. i had no *AppDelegate.m, *AppDelegate.h nor *.xib file) but easy to get to the end of the tutorial.
In the end i got like 1000 errors, something to do with precompile appkit.h errors, and with a quick search here is the solution for all those errors:
http://www.cocoabuilder.com/archive/cocoa/194905-xcode-cocoa-project-with.html#195211
easy peasy :)

Rectangular cursor keypad in XCode

I've got interesting strange bug in Xcode. I can't find an information and can't fix it.
What happened. One day I came into office, and launched the project in XCode (I do not remember the sequence of actions), and instead of a standard keyboard cursor when editing text, I see a flashing white rectangle. The rectangle is similar to the cursor in the operating system DOS. I can not turn it off. The problem has plagued me for a second day.
Take screen shot
Buttons H, J, K, L perform cursor in the text. Backspace key does not work. Later, after some keystrokes, everything becomes normal, the cursor becomes a standard. After a few seconds, the cursor becomes black again, and everything continues to this scheme.
Additional information:
Mac mini 2011, OS Mac OSX Lion 10.7.3, XCode 4.3;
The problem only occurs in XCode;
The problem occurs with all projects;
I did not change system settings or XCode;
This is not a text selection. If you hold the left mouse button, the rectangle appears on the left of the cursor, in the normal state, the cursor is displayed on the right;
XCode reinstalled several times, with reboots the computer;
Delete all data in the folder ~ Library/Developer/ and ~/System/Library/Developer;
Connect other mouse and keyboard;
I was looking for information on google and stackoverflow.
Thank you for your answer!
I solved this problem.
Deleted XCode. Then I used the program "Find Any File" to search for files containing the title of "xcode" and deleted all files that have been found. Then reinstalled XCode and the problem disappeared.
I tried to find where the settings are XCode but did not find such information, so delete all files containing "xcode" in the title.
This happened to me and I found that I had installed xVim and hadn't noticed it since the changed don't take effect until after restarting Xcode. I removed the plugin in ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins to fix the issue.

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.

Xcode window positions when switching from dual to single monitor

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.

Resources