Question

I can't figure out the shortcut combination to use in this scenario. I am using AppCode with IdeaVim plugin.

How do I make appcode automatically assign my expression to a variable? For example, I have written:

[self getString]

which returns an NSString *.

Is there a hotkey I can press which will make this statement be assigned to the right kind of variable? So, something like:

NSString * newVariable = [self getString];

I think this is possible in Eclipse+java.

Was it helpful?

Solution

Use Refactor | Extract | Variable. See also the related answer. Keyboard shortcut for this refactoring can be changed in Preferences | Keymap. Default shortcut is Alt+Cmd+V.

OTHER TIPS

Since I am using IdeaVim plugin in AppCode. I had to Press ^T to get the "Refactor This" popup menu and press 1 for Variable. So, the answer to my question is:

press ^T then 1.

The more I use AppCode+IdeaVim, the more I love it. Thanks CrazyCoder to point me in the right direction.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top