https://kotlinlang.org logo
#android
Title
# android
m

Mark

01/05/2019, 7:20 AM
In Android Studio (MacOS), with java if I have a statement like
MyClass c = foo.bar
I can hold down Cmd key and click on
MyClass
to jump to class declaration. Kotlin is much more concise so we have
val c = foo.bar
but now we don’t have
MyClass
to easily click on. I know we can do Shift-Cmd-B but that’s not particularly memorable. I suppose we also have the option to reprogram shortcuts but I prefer to stick to defaults where at all possible. Any tips?
r

rkeazor

01/05/2019, 6:16 PM
Shift-Cmd B -> shows type definition cmd B shows variable definition .It is the same exact thing in Kotlin and java.. if you want a type to click on than just include it in your variable declaration. Kotlin doesn't force you to infer types
👍 1
2 Views