Everyone likes to increase their productivity and everyone has their own favourite productivity hacks, but not everyone agrees! In this blog, Rui will talk about their top three Android Studio shortcuts and how they're better than the rest.
⌘0 … ⌘9
Open tool window
When I’m not on my desk, I’m usually limited to my MacBook’s 13”. While I do love the portability, finding the balance between a resolution that doesn’t cause me eyestrain and one where I have the most room possible is hard. That’s why I have the constant need to show/hide Studio’s many panels: Project, Structure, Run, Debug, etc.
When a panel is shown, it’s usually automatically focused, enabling you to navigate in it easily and go back to your editor by pressing Esc (if not, try pressing the shortcut again to gain focus). Sometimes I use ⌘7 ("Structure") this way as a replacement for the “File Structure” shortcut - ⌘F12 .
Go to file
I’m pretty sure this one is on many devs’ top 3. Given IntelliJ IDEA ’s powerful auto-completion features, you can easily find any file in your project with this shortcut. Don’t exactly remember that class name but you’re pretty sure it’s something like WutPrototypeDelegateFactoryAdapter ? Try typing in “PDFA” and you should see a list of PrototypeDelegateFactoryAdapters come up. If you’re looking specifically for a class, you can stick to ⌘O .
This one… This is the one. I know I could learn all those refactoring shortcuts and I’m pretty sure there are predefined ones for things such as “Split vertically”, “Close all”, “Close others”, etc. but let’s face it, I’m not a finger contortionist nor I want to be one. No need to bend and intertwine my fingers in awkward angles.
“Find action” allows me to type want I want to do and it is context aware. Want to rename that method? Place your caret on its name, ⌘⇧A and type “ren”. That should be enough. This is a simple example, but it can do much more for you. If you’re looking for something more broad, “Search everywhere” - Double ⇧ - might be the one for you.
Tip: when I can't open the tool panel I want with ⌘0 … ⌘9 , I either try "Find action" or "Search everywhere" and type in the panel's name.