Cool shortcuts in Android Studio

Kiran Bablani
2 min readMar 17, 2022

--

Generally, shortcuts ensure work in less time hence giving more time for other tasks. It’s troublesome when you skip steps but, it doesn’t apply to our world because we spend a lot of time typing on a keyboard well, that is if you aren’t stuck in meetings all day. 💁

Although there are so many shortcuts available. Let's see some of them which are fun and handy to use.

1. Command+W

It is used to close the active file you are editing. Using it multiple times closes the last edited files one by one.
Windows/Linux -> Ctrl+F4

2. Command+Down Arrow

It is used when you need to check the source of a method or variable.
Windows/Linux -> F4

3. Command+E and Command+Shift+E

It gives a pop-up list of recently opened files and edited files. It is useful to navigate or track the last changes.
Windows/Linux -> Ctrl+E and Ctrl+Shift+E

4. Command+Shift+H and Control+Option+H

It is used to check the method and its calls hierarchy. It is helpful when you are making changes to existing files.
Windows/Linux -> Ctrl+Shift+H and Ctrl+Alt+H

5. Command+B

It is used to switch to XML from the design tab in Design Layout Editor.
It is also used to jump to the declaration/usage of a method or variable. (Can also be done using Command+click)
Windows/Linux
-> Ctrl+B

6. Command+D

It is used to duplicate the current line or selection. It is most helpful when you have to use somewhat the same kind of statements.
Windows/Linux -> Ctrl+D

7. Control+Option+O

It is used to optimize imports. This is the most useful shortcut for me because it saves me a lot of time for fixing lint errors, like removing unwanted imports.
Windows/Linux -> Ctrl+Alt+O

8. Control+J

It is used to look up the documentation of the selected method/variable. It is useful to check if you are using it the right way and helps you eliminate errors or other exceptions at an early stage.
Windows/Linux -> Ctrl+Q

9. Command+1

It is a straightforward command to toggle the visibility of the Project tool window.
Windows/Linux -> Alt+1

10.Control+V

VCS operations are important for us. this command pop-ups the list of commands for VCS operation.
Windows/Linux -> Alt+`

There are many more shortcuts that you may or may not use a lot. What is your favorite one?

Suggestions are always invited!! Happy Coding

--

--