I use Xcode with the key bindings heavily overriden to match my taste, for example, I use Alt+[/] as shortcuts for the "Jump to previous/next placeholder" commands. Unfortunately, with the latest 4.4.1 update these bindings stopped working and now I'm getting quote characters (“‘) dumped into the text editor instead. The binding setup is still marked as valid (no conflicts are reported by Xcode). Any thoughts on this?
OSX 10.7.4, Xcode 4.4.1 (4F1003), standard US layout, alu keyboard if that matters.
Ok, turns out there are multiple entries for the seemingly same function, as shown in the image below:
Setting both to the same binding did the trick.
Related
How do you view the cursor's current line and column position in Xcode? This is irrespective of showing the Line Numbers on the active sheet's left side, how can you show 'Line, Column', or look it up.
Here is an example from Eclipse -
Too my knowledge, showing column number has been removed from new versions of Xcode. You can see line number and set column guide in text editor setting though.
If you are coding in c/c++ I strongly suggest switching to QtCreator or Clion. I personally prefer QtCreator since 1) it has a fakeVim key binding and 2) it is better at loading symbols and giving autocomplete suggestion.
Try this Xcode plugin: Backlight for Xcode
You can use Alcatraz to easily install this plugin, another way of installing it is to:
Download source
Build code
Restart Xcode
(Check Github page on how to further configure the plugin)
I always have my Xcode assistant editor open with counterparts option. It's very handy to have an *.m file opened at standard editor while having corresponding *.h file in assistant editor.
After recent update to version 6.3 Xcode started to show random instead of corresponding headers quite often. Several clicks to "four squares" icon and mode usually brings it back (but it's very annoying).
Do you experience this too? How to fix it?
Note: deleting DerivedData didn't helped
As a workaround, one could use the Reset Editor command with the keyboard shortcut Command+Option+Shift+Z (US keyboard layout). If your keyboard layout doesn't match, you can see the key binding in View->Assistant Editor->Reset Editor. A word of caution, though, this will close any additional Assistant Editors you may have opened (the ones that open by clicking "+").
Another thing I noticed is the bug happens when you are switching Xcode windows or tabs but not when you are switching files within the same tab.
It looks like it's a just bug after all. I filed a bug report rdar://20684654. For a workaround see the accepted answer.
UPDATE: it's fixed in Xcode 6.4 beta
I tried to use Control-Command-Whatever Alphabet as the key equivalent for an NSButton. Xcode interface builder doesn't allow me to do that. I tried editing the xib file in an external editor, adding control="YES" into the <modifierMask> node. Once I open the xib file in Xcode, Xcode deletes control="YES" that I added previously. The only workaround seems to be doing it in code.
Is there any reason Xcode disallows using Control in key equivalent for an NSButton? Should I also avoid doing it in code if it may become a problem?
I am using Xcode 6.1 on Yosemite.
From the human interface guidelines:
As much as possible, avoid using the Control key. Because the Control key is already used by some of the universal access features—as well as in Cocoa text fields where Emacs-style key bindings are often used—it should be used as a modifier key only when necessary.
So, while the behavior of Xcode isn't very nice in this regard, it is probably just trying to enforce the guidelines. As you rightly say, you can work around it easily enough in code.
I've got a really frustrating issue in Xcode 4.2.1 on OS X Lion, where the code folding doesn't seem to work, or at least hardly every with no obvious reason.
The default keyboard shortcuts are supposed to be:
Fold Methods/Functions ⇧⌘⌥⌘← shift+option+command+left
Unfold Methods/Functions ⇧⌘⌥⌘→ shift+option+command+right
.. but I just get the Homer ('Doh'), error sound all the times I try it.
I always make sure I have the correct pane selected (before anyone asks ;o), and have also tried the following, with no luck:
- With & without Assistant editor enabled
- In a total separate editing window
- By selecting 'Code Folding >> Fold Methods & functions' from the Editor menu
- Changing the keyboard shortcut (Even tho no conflict was showing)
The only clue I have, and I'm not sure if it's related, is that whenever I press the 'option' key in the editing view my cursor changes to a + (or crosshair) - It only does this in the editing views of Xcode, however I don't think this is the issue as if I change the shortcut to not use the 'option' key, it still doesn't work.
Anyone got any ideas, as it's driving me barmy & my searches haven't come up with anything??
OK, I finally resolved to totally remove Xcode, clear out prefs and then re-install.
This seems to have fixed the issue (So far at least)
I've found that Xcode 3 won't fold unless syntax highlighting is turned on. I don't like syntax highlighting, so for lack of a better alternative I use 'View->Syntax Coloring->Simple Coloring', which only highlights comments and numbers.
When Xcode autocompletes an method for me, it gives me blue blocks for parameters. I always go into the first, but then I click into all next ones rather than fast going there by keyboard commands. I guess that there are some good ones to know.
The default is Command-/, but you can customize that in the key bindings section of XCode's settings window.
In Xcode 3.2 (Snow Leopard), you can also use the Tab key to navigate between parameters. Personally, I find this more intuitive than Command-/.