Summary of AndroidStudio shortcut keys

Summary of AndroidStudio shortcut keys

Ctrl+G / Ctrl+Alt+Shift+G: Query where a variable, function, or class is used or called. The latter is a complex expression of the former, and you can select the query scope, etc.

Alt+H: Search function, global search

F4: View class inheritance relationships

F2: View the documentation (function instructions)

Ctrl+E: View recently opened files

Ctrl+Shift+E: View recently edited files

Double Shift: global search, this view is slightly different from Alt+H, this is a global file search, to the file name level.

Ctrl+Shift+R: Quickly locate the file you want to open.

Alt+↑: Move the line of code where the cursor is located upward

Alt+↓: Move the line of code where the cursor is located downward

Ctrl+D: Delete the line of code where the cursor is located

Ctrl+X: Cut the line of code where the cursor is located

Alt+Shift+↓/Ctrl+C: Copy the code on the line where the cursor is located to the next line

Ctrl+O: Quickly search for functions and variables in the current class

Ctrl+Shift+R: Modify name

Alt+Enter: Import package

Alt+←: Go back to the last viewed or edited location

Alt+→: Move forward. For example, if you want to go back after moving to the previous point, you can use this shortcut key.

Ctrl+/: Comment the current line, press again to uncomment

Ctrl+Shift+/: Module comment, uncomment and press again. Note that the "/" here cannot be used with the numeric keypad.

Ctrl+Shift+Number Keyboard/: Fold code (Ctrl+Shift+Number Keyboard* doesn't work anymore, I don't have time today, I will solve this problem later and update it), of course, the laptop doesn't have a small keyboard, you can change the shortcut key yourself

Ctrl+Alt+S: Open the settings interface

Ctrl+Alt+Shift+S: Open the Project Structure interface

Alt+Shift+X: Run

Alt+Shift+D: Debug

Ctrl+F9: Compile the project

Ctrl+Shift+K: push files to Server (git)

Debug shortcut keys

F5: But enter the function without debugging.

F6: But do not debug or enter the function.

F7: Return to the calling point from within the function.

F8: Execute to the next breakpoint, or complete if there is no breakpoint.

Action Mac OSX Win/Linux
Comment code (//) Cmd + / Ctrl + /
Comment code (/**/) Cmd + Option + / Ctrl + Shift + /
Formatting Code Cmd + Option + L Ctrl + Alt + L
Clear invalid package references Option + Control + O Alt + Ctrl + O
Find Cmd + F Ctrl + F
Find + Replace Cmd + R Ctrl + R
Move code up and down Option + Shift + Up/Down Alt + Shift + Up/Down
Deleting a row Cmd + Delete Ctrl + Y
Expand or reduce the selected range Option + Up/Down Ctrl + W / Ctrl + Shift + W
Quickly generate structures Cmd + Option + T Ctrl + Alt + T
Quick Override Method Ctrl + O Ctrl + O
Quickly locate the beginning/end of a line Cmd + Left/Right Ctrl + Left/Right
Collapse and expand code blocks Cmd + Plus, Minus Ctrl + Plus/Minus
Collapse and expand all code blocks Cmd + Shift + Plus, Minus Ctrl + Shift + Plus, Minus
File method structure Cmd + F12 Ctrl + F12
Find the location of the call Ctrl + Option + H Ctrl + Alt + H
Case conversion Cmd + Shift + U Ctrl + Shift + U

Original address: blogs.zmit.cn/6313.html

<<:  Use of global variables and local variables in Android

>>:  Can a single machine host more than 100,000 projects? Curious, come and learn about the hardware platform of this Git repository

Recommend

These 20 "health care" suggestions are all wrong, don't be misled anymore!

“Drinking more porridge can nourish the stomach”,...

2019, smartphones have no savior

[[258389]] Compared to last year, the smartphone ...

No idea for APP promotion? One map helps you get all channels! (Super complete)

Everyone working in the Internet industry knows t...

World Economic Forum: The impact of artificial intelligence on Education 4.0

If deployed properly, AI can help find solutions ...

Anhui Jinzhai Red Education Base

Anhui Jinzhai Red Education Base training consult...

After the resumption of work, how to create online marketing in 4 steps?

Based on the accumulation of Internet brand commu...

Community operation: 5 ways to get to know the community and master it

This article explains in detail the routines from...