Frequently Used Shortcuts in Android Studio and VSCode
Introduction
Recently, I’ve been working with Rails, Go, and Flutter.
I use Android Studio for Flutter development and VSCode for everything else.
Sometimes, I forget how to use a shortcut in one IDE that I frequently use in the other, so I wanted to compile a list for myself (I like Android Studio, so switching to VSCode completely is not an option).
Frequently Used Shortcuts
Assuming the OS is Mac.
Android Studio | VSCode | |
---|---|---|
Focus on the explorer (tool window) | Command + 1 | Command + 0 |
Open the file focused on in the explorer (tool window) | Enter | Space |
Focus on the editor | Esc | Command + 1 |
Jump to definition | Command + B | F12 (I have set it to Command + D) |
Global search | Command + Shift + F | Command + Shift + F |
File search | Command + P | Command + Shift + O |
Navigate editor tabs | Command + Shift + [, Command + Shift + ] | Command + Option + ←, Command + Option + → |
Quick fix | Option + Enter | Command + . |
Duplicate current line or selection | Command + D | Shift + Option + ↓, Shift + Option + ↑ |
Move current line or selection | Command + Shift + ↑, Command + Shift + ↓ | Option + ↑, Option + ↓ |
I use Vim plugins in both IDEs for navigation, text manipulation, and screen splitting, so there might be fewer IDE-specific shortcuts here.
I also use iTerm2 for terminal input. It’s convenient to quickly focus and input using Hotkey. I’ve written about iTerm2 Hotkey in this article:
Conclusion
If you’re not using shortcuts, I highly recommend starting. I was initially resistant to learning shortcuts, but now I can’t do without them.
Not only will it improve your development efficiency, but it will also make coding more enjoyable. Give it a try!