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

Handled TreeView.SelectedItemChanged event still bubbles

.net wpf com treeview event-bubbling

I have a TreeView bound to a hierarchy consisting of several different classes via HierarchicalDataTemplates. When an item in the tree is selected, the SelectedItemChanged event of course happily b...

Play framework auto-loading in docker container

playframework docker development-environment boot2docker

I'm trying to set up a development environment for developing a play application in a docker container. I have created an image with sbt installed. I then map the project folder on my host to the

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.