Thursday, 24 July 2014

Android Studio Shortcuts

Here is the category-wise list of shortcuts for Android Studio IDE.

Using them in day to day programming with Android Studio will definitely save your time!!.

Search/Find/Replace:


Ctrl + F Find in current file
F3 Find Next in current file
Shift + F3 Find Previous in current file
Ctrl + R Replace in current file
Ctrl + Shift + F Find in Path (Whole Project, Module or Directory)
Ctrl + Shift + R Replace in Path
Alt + F7 Find Usages
Ctrl + Alt + F7 Show Usages in a Popup


Code Assistance:


Alt + Enter Quick Fix
Ctrl + Space Assistance in code completion
Ctrl + Q Show Documentation for selected element

Ctrl + P

Show Parameters for selected method

Alt + Insert

Generate Code (Constructor, Getter/setter, equals(), hashcode() etc..)

Ctrl + O

Select Methods to override/implement

Ctrl + Alt + O

Optimize imports

Ctrl + Alt + T

Surround with (if/else, try/catch, do/while etc..)

Shift + F6

Rename

Ctrl + D

Duplicate selected piece of code (*It is not Delete Line)

Ctrl + F4

Close current editor window

Ctrl + F12

Displays File Structure (methods and instance variables for a
class)

Ctrl + Shift + F12

Maximize or restore current editor window

Ctrl + Alt + S

Displays Settings dialog

Ctrl + Alt + Shift + S

Displays Project Structure dialog


Navigation:



Ctrl + N

Go to class

Ctrl + Shift + N

Go to File

F4

Go to Source (goes to implementation for method, declaration
for variable)

Ctrl + G

Go to Line

Ctrl + B

Go to Declaration of class, method or variable

Ctrl + E

Recent Files popup

Alt + Up Arrow

Navigate to previous method in editor window

Alt + Down Arrow

Navigate to next method in editor window

Alt + Left Arrow

Navigate to previous editor window

Alt + Right Arrow

Navigate to next editor window
Ctrl + U
Go to parent of selected element
Ctrl + H
Displays Type hierarchy

Ctrl +Shift + H

Displays Call hierarchy


Add/Remove Comments:



Ctrl + /

Toggle line comment (comment/uncomment using '//' )

Ctrl + Shift + /

Toggle block comment (comment/uncomment using '/*....*/' )



Debug/Run:



Shift + F9

Debug

Shift + F10

Run

Alt + Shift + F9

Select configuration and Debug

Alt +Shift + F10

Select configuration and Run


Deletion:


Ctrl+Y Deletes current line
Ctrl+Del Deletes word next to cursor position
Ctrl+Backspace Deletes word previous to cursor position


Indentions:


Alt + Ctrl + i Correct indentions of selected lines
Tab Increase Indent of selected lines
Shift+Tab Decrease Indent of selected lines



General Editing:


Ctrl + C or Ctrl + Insert Copy
Ctrl + X or Shift + Del Cut
Ctrl + V or Shift + Insert Paste
Ctrl + Y Delete current line(*It is not Redo)




No comments:

Post a Comment