Xcode auto completion to replace function call name - how to drop placeholders?
Asked Answered
B

1

8

Xcode's auto-completion is often getting in my way by giving me argument placeholders when I already have them. Here's an example:

Xcode editor screenshot

I want to change that second MoveToPoint to AddLineToPoint, so I delete part of the name, and hit control + space for the Show Completions command. I get something like:

Xcode editor screenshot with auto-completion menu

You see the annoyance. I tab complete the name, but now I have to delete the 3 arguments, the commas, and the parentheses. This kind of thing annoys me and throws off my flow when writing code.

Ideally I'd like a way to delete these placeholders with one command, or have a separate auto-complete command, so along with Show Completions (control + space), I could bind something like Show Completions without Placeholders. Does anyone know how to do that?

Bagpipe answered 30/6, 2013 at 14:37 Comment(3)
Wow. An xcode question, appropriately tagged.Allisan
Sounds like a good candidate for an enhancement request to Apple. I know I could support for this.Scone
I just created a the request in their bugreport.apple.com site. I don't know if others can see it or not but the ID is 14331965.Bagpipe
N
1

XCode does support this actually. They call it "Select Previous Completion". Check it out here (under Code Sense).

You essentially just hit ⌃> (hold control and press >) for XCode to choose your previous completion. It think it only works well though if the new method you're calling takes the same number of arguments as the previous one.

Hope this helps

Nationalist answered 9/9, 2013 at 14:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.