1

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.

user674669
  • 10,681
  • 15
  • 72
  • 105

2 Answers2

2

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.

Community
  • 1
  • 1
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • CrazyCoder, I don't see "Introduce Variable" option either in Refactor menu or after selecting Refactor after mouse right click. I am using AppCode with IdeaVim plugin. – user674669 Aug 11 '12 at 08:53
0

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.

user674669
  • 10,681
  • 15
  • 72
  • 105