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

4 suggestions for writing articles for public accounts

The author of this article will share with us 4 o...

Analysis of mobile advertising in the skin care and beauty industry in Q1 2019

The first quarter of 2019 has passed. So what are...

Why does Party A ask Party B to focus on creativity and less on strategy?

Many advertising companies often run into problem...

2021 Double 11-KOL Marketing Preparation Strategy Insights and Resources

The release of Double 11 commercial content is co...

Learn how to set up SEM search bidding flash in 10 minutes

When I first entered the industry, I was in a hur...

Do you agree with the three aspects of iOS 10 that make people dissatisfied?

Apple has added some interesting and practical fe...

How difficult is it to grasp something you can't feel with your mind?

In the science fiction drama "Love, Death &a...