Xcode auto-completion - replace text keystroke?

Say we have a TestClass with the 2 methods, -getSomeString and -getAnotherString, and we are editing the following code and the cursor is in the location shown:

NSString *aString = [TestClass get<cursorIsHere>SomeString];

Say I want to change it to use -getAnotherString. If I bring up the auto-completion popup and select the other method via hitting enter or tab, I'm left with:

NSString *aString = [TestClass getAnotherStringSomeString];

i.e., it doesn't replace the existing text but rather just inserts.

Is there a special keystroke to make it replace the remaining text?

See IntelliJ for reference.

Answers


I don't think that there is a one step operation to achieve this. My suggestion would be similar to Thomas Templemann, but rather than two steps of forward word select and then Delete, I would expand to the desired autocomplete, by bouncing on Control + . and then hit Option + forward delete, which kills to the end of the word.


Need Your Help

Get storyboard-defined UINavigationController from AppDelegate

iphone ios objective-c uinavigationcontroller storyboard

In storyboard, I have an introductory view controller which fades to a UINavigationController.

Create Event in WPF

c# wpf events event-handling kinect

I want to rise an event to zoom in and zoom out the image once the gesture is recognized that it is valid (gesture recognized by Kinect). my image is shown in different user control loaded in a frame