Top 3 Android Studio Shortcuts

Everyone likes to increase their productivity and everyone has their own favourite productivity hacks, but not everyone agrees! In this blog, I will talk about his top three Android Studio shortcuts and how they’re better than the rest.

## Goto Next Error

#### F2

![GIF OF SHORTCUT 1 IN ACTION](/blog/content/images/2016/07/f2_w_keyboard.gif)

Pressing F2 will move the cursor to the next compilation error in the class file. If there are no compilation errors it will move to the next warning.

This is great when you know there’s an error but you aren’t sure where, or you can see there is a red error on the right side of Android Studio and to save you scrolling just hit F2.

If you want to be extra productive you can also use SHIFT + F2 to go to the _previous_ error, really great for navigating up and down.

___

## Start New Line

#### SHIFT + ENTER

![GIF OF SHORTCUT 2 IN ACTION](/blog/content/images/2016/07/shft_enter_w_keyboard.gif)

This shortcut will put a blank line directly below where your cursor is positioned.

The benefit being (for me at least) I no longer either have to grab the mouse or do the awkward dance of hitting END then ENTER to create a new line (without breaking the current).

There is a really complicated alternative for creating a new line above where your cursor is positioned, I don’t want to tell you it because it’s much easier to press up then use this key combo.

___

## Highlight more key shortcuts

#### ALT (when in a modal dialog)

![GIF OF SHORTCUT 3 IN ACTION](/blog/content/images/2016/07/alt_w_keyboard.gif)

This shortcut is specifically when you are in dialog boxes (or many places with multiple options). Press the ALT key and it will put a little underline under other shortcuts that are available. Like in the GIF it shows R is available to Refactor, so if I press ALT + R it will refactor, or ALT + P to preview.

Benefit is not having to touch that dahm mouse!

A related shortcut and a bit of a hack (because I am never sure when to do it) but it is to hold CTRL when pressing Enter to confirm a dialog. Sometimes ENTER just doesn’t work!

Leave a Reply

Your email address will not be published. Required fields are marked *