Tuesday, August 16, 2016 [Tweets] [Favorites]

Xcode’s “Copy Qualified Symbol Name” Command

Joar Wingfors:

Xcode Tip Of The Day:

[Xcode > Edit > Copy Qualified Symbol Name]

Or: Cmd+Shift+Option+Ctrl+C

It’s hard to type with one hand but rather useful. For example, you can put the cursor anywhere in a method definition or call, and it will copy the full name to the clipboard, e.g.:

-[NSArray(NSExtendedArray) enumerateObjectsWithOptions:usingBlock:]
removeAll(keepCapacity:)

You don’t have to select any of the pieces.

Joar Wingfors:

Now, if only Open Quickly supported qualified symbols…

For sure: 10450773. Pile on!

My most recent Radar number is 27865953, so I guess people have been wanting this for a long time.

Update (2016-09-20): Felix Schwarz:

In Xcode 8, place the cursor above a method or function & press “⌥ + ⌘ + /” to auto-generate a doc comment.

5 Comments

Too bad it doesn't quite work with C++ functions/methods — it omits the parameter list. Otherwise it would be perfect for creating the implementation of a new method added to the class declaration.

I don't believe that you need to hold the Option key down. "Shift + Ctrl + Cmd + C" works just fine

@ron If you don’t hold down Option, you get the “Copy Symbol Name” command, which will give you:

-enumerateObjectsWithOptions:usingBlock:

I can't see the menu in Edit, but the shorcut works!

@charles You have to hold down the modifier keys to see it in the Edit menu.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment