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

It’s the last month, try harder!

After today There is only one month left in 2021 ...

Brand promotion: Where is the entry point for offline interactive advertising?

1. The advertising industry’s thoughts and concer...

International Bird Day丨Come and learn about “birds”?

Since ancient times Beasts galloping in the fores...

Tencent Advertising advertiser account opening qualification requirements!

Enterprise account opening qualification requirem...

Collect now! 22 super practical free Figma plugins

Editor's note: This article was originally pu...

118 latest advertising industry terms, learn them!

For advertisers, professionalism is the embodimen...

Sometimes, involution is also a waste of time | Scientific reverie

When paddling hard, don't forget to look up a...