Friday, May 1, 2015

Spicing up Xcode

Zev Eisenberg (via Hoà V. DINH):

But remember, I wanted the xib. I could press the down arrow key twice, or use the mouse to double click the third result, but there’s an easier way. Since the file extension is taken into account in this dialog box, I can just add an additional “x” to my search in order to highlight the correct file, and then press Return to open it.


Most menus in Xcode are fully searchable. Just start typing, and a search field will appear, filtering the menu down by the characters you’ve typed. And the best part is that searchable menus employ the same fuzzy matching as the Open Quickly dialog.


I feel like I can sometimes get a “back” navigation action to go back to where I was editing, but I just tried and couldn’t get it to work. Here’s what I do as a workaround: if I’m somewhere in a file and I know I need to jump to the top for an import, I write some garbage or leave a line unfinished, so that I get an inline compiler error. After I make my edit at the top of the file, I use ⌘’ (Command-apostrophe) to Jump to Next Issue, which brings me back to the line of code that I broke.


You can also use ^@ to set a mark and then ^X^X to go back to it when needed (only moves cursor, cmd-shift-L to scroll to cursor).

Still a far cry from BBEdit’s Jump Points feature, and you have to Jump to Selection afterwards, but it does work.

1 Comment RSS · Twitter

I use that inline compiler error frequently. I just add a line to the code "xxx;". I do this particularly if the code currently compiles but is incomplete, to avoid me accidentally forgetting to come back and finish this code. For example, if I run out of time implementing something and have to leave the computer, there is a risk I'll focus on something else when I return and forget that the function is incomplete - this saves me from that case, as well as giving me a quick way to return to focus on what I was doing.

Leave a Comment