Code faster by using keyboard shortcuts
Description | Mac | Linux/Win |
---|---|---|
Lookup IDE commands / Actions | Cmd Shift A | Ctrl Shift A |
Open Class | Cmd O | Ctrl O |
Open File | Cmd Shift O | Ctrl Shift N |
Open recently edited file | Cmd Shift E | Ctrl Shift E |
Open Symbol | Cmd Opt O | Alt Shift N |
Open recently used file | Cmd E | Ctrl E |
Last Edited Location | Cmd Shift Backspace | Ctrl Shift Backspace |
Find Usage in persistent window | Opt F7 | Alt F7 |
Find Usage in floating window | Cmd Opt F7 | Ctrl Alt F7 |
Format the code with proper Indentation | Cmd Opt L | Ctrl Alt L |
Surround With | Opt Cmd T | Alt Ctrl T |
Open Terminal | Opt F12 | Alt F12 |
Generate Setter/Getters | Cmd N | Alt Ins |
Find Class | CMD O | Ctrl N |
Refactor/Rename | Shift F6 | Shift F6 |
Quick Fix | Opt Enter | Alt Enter |
Goto Definition | Cmd B | Ctrl B |
Show parameters for selected method | Cmd P | Ctrl P |
Refactor This | Ctrl T | Ctrl Alt Shift T |
Stop Process | Cmd F2 | Ctrl F2 |
Search Everywhere | Shift Shift | Shift Shift |
Select Methods to Override | Ctrl O | Ctrl O |
Delete Line | Cmd Backspace | Ctrl Y |
Duplicate Line | Cmd D | Ctrl D |
Grow/Shrink selection from cursor | Opt Up/Down Arrow key | Shift Ctrl W |
Multicursor Selection | Ctrl G | Alt J |
Complete Keymap Guide : Linux/Win | MacOSX
Other Tips/Tricks
-
Did you know you can quickly lookup the definition of any function by navigating to the function call and using
Opt + Space
on macOS orAlt + Space
on Win/Linux inside Android Studio🙀 [Ref Tweet] -
Annoyed by the Design view always opening up when you open a layout or drawable xml file?🙄Navigate to Preferences ▶️Editor ▶️Layout Editor and choose "Code" option, to always open in Code view. [Ref Tweet]
-
If you want to use keyboard shortcuts with bookmarks, then make use of "Bookmark with Mnemonic". Once assigned a number, you can jump to the bookmark using
Ctrl + Number
. [Ref Tweet] -
When working with a class file dat has a lot of loc, often times one needs to jump between some parts of the same file. To do that, one can use the "Bookmarks" in Android Studio! Simply mark the line of code as Bookmark & open up the Bookmark Panel to jump. [Ref Tweet]
-
Bunch of quick tips about refactoring under this blogpost I wrote for raywenderlich.com