Corbin's Treehouse - Corbin Dunn, Santa Cruz, CA
Plug Bug

Xcode tips and tricks — fast method finding

Inside of Xcode, I’ll want to quickly go to a method implementation. If you hit Cmd-F and do a find for the method name (or the start of it), you will frequently get hits for calls of the method instead of just the implementation.

There is a quick way to find the implementation: Hit Cmd-F and type: “)methodName”.

The left paren will match only the implementation (provided you don’t put a space after it…which you shouldn’t do anyways).

I picked up this little tidbit by watching Troy Stephens code around. Thanks Troy!

6 Responses to “Xcode tips and tricks — fast method finding”

  1. Daniel Jalkut says:

    provided you don’t put a space after it…which you shouldn’t do anyways

    Hmm… no accounting for taste :)

  2. corbin says:

    I know… I know..personal coding style differs from person to person. In the AppKit group, we tend to prefer not having the space.

  3. I. Savant says:

    It’s interesting to see this mentioned – since my earliest days of using text editors, little tricks like this are how I’ve survived. :-) People are usually amazed to see me blazing through any type of structured text document … “How do you do that so fast?!” and I always try to tell them things like this, if you think them through first, usually work well. In the case of not putting a space, it would still work however your style looks, provided you’re consistent. :-)

  4. ken says:

    Hey Corbin,

    You aware of the control-2 keyboard shortcut in Xcode? It moves focus to the function popup, from which you can use type-select.

  5. corbin says:

    Hi Ken,
    i wasn’t aware of that! but i do find the ctrl-key rather hard to hit with 2; it is in an akward position, especially on a mac/powerbook.

  6. Daniel Jalkut says:

    Very cool – I didn’t know about that shortcut, either. For what it’s worth, the shortcut is modifiable through Xcode preferences. Under “Text Key Bindings” it’s called “Pop Symbols PopUp.”

(c) 2008-2017 Corbin Dunn

Corbin's Treehouse is powered by WordPress. Made on a Mac.

Subscribe to RSS feeds for entries and comments.

38 queries. 0.392 seconds.