Is there a shortcut to quickly show the type of a variable in JetBrains' AppCode? Preferably this would be something akin to Visual Studio, which shows the type of a variable when you hover over it with the mouse.
-
@RichardBrown: This question is not about ObjC language features, nor does it contain ObjC code. The [objc] tag is not applicable here. – jscs Apr 09 '13 at 20:20
-
this question seems answered. would you be willing to mark it as such to close it? – bazik May 10 '13 at 06:47
4 Answers
You can press SHIFT-COMMAND I
to see the definition of the variable under the cursor. It shows you the line that defines the variable, as well as which file. Pretty handy when looking at code you didn't write.

- 11,346
- 4
- 32
- 43
Alternately, if you hold the command key while hovering, you can hover the variable to have the executive summary info bubble. By then clicking the keyword (not the info-bubble) you can then get 'beamed over' to the code that declares or implements the specific interface. For example, in the following line :
[fa.AoEspec addTileSpec:[AoEtile AoEtileFromString:@"0,0,50,hit"]];
I will get an 'info bubble' for fa (local variable), AoeSpec (a property) AoEtile (a class) AoeTileFromString ... all clickable.

- 9,070
- 8
- 35
- 48
In AppCode 2.1.x Cmd+Shift+I
is not a predefined keyboard shortcut (anymore?!). And the previous mentioned Cmd+MouseOver
may not be suitable for keyboard-only-junkies. So here come some alternatives:
Cmd+B
- to go to the definition (andCmd+Alt+CursorLeft
to go back)Alt+Space
orCmd+y
- to show the quick definition window [1]
Maybe this is helpful.
[1] In AppCode 2.1.2 there seems to be a bug I filed with JetBrains that the quick definition window is empty for iVars (these underscore variables that are generate by auto-synthesize from @property fields). But in all other cases quick definition window works fine! And maybe the bug is fixed when you read this...

- 1,061
- 9
- 13
What works for me in AppCode 2018.2 is control + command + ?
when the variable is under the cursor (quick documentation under View).
You can see a couple of other useful combinations under the View menu.

- 2,352
- 23
- 32