The most common shortcut keys for Android Studio (Mac version)

Source: Internet
Author: User

The most common shortcut keys for Android Studio (Mac version)

How to Set important shortcut keys:

Android Studio-> References-> Keymap

1. expand and contract the Code:

Setting Method: Main menu-> Code-> Folding-> Expand/Collapse

2. Global Search:

Setting Method: Main menu-> Edit-> Find in Path

3. Global replacement (super practical ):

Setting Method: Main menu-> Edit-> Find-> Replace in Path

4. View and replace the current file

Setting Method: Main menu-> Edit-> Find-> Replace

5. jump from the layout file to the associated Activity or from the Activity to the associated layout file:

Setting Method: Main menu-> Navigate-> Relate Symbol

6. Go back to the last editing point:

Main menu-> Navigate-> Back

Main menu-> Navigate-> Forward

7. Go to the source file

Main menu-> View-> Jump to Source (such as methods, variables, and classes)

Main menu-> Navigate-> Declaration (for example, click the view id of findViewById to enter the R file instead of the layout file. You can use this shortcut key)

In this way, there are two shortcut keys for entering the Source file: [Jump to Source, Declaration ]. It is troublesome to use, and you need to distinguish between scenarios.

You can delete the shortcut keys of Main menu-> View-> Jump to Source. You can only use the shortcut keys set by Main menu-> Navigate-> Declaration, in this way, it can be used in the association layout or in the class.

8. Move the code up/down

Main menu-> Code-Move Statement Up/Move Statement Down

9. Comment on the shortcut key:

Single Line Comment: Main menu-> Code-> Comment By Line Comment

Code Block Comment: Main menu-> Code-> Comment By Block Comment

10. Select the string in uppercase and lowercase letters.

Editor Actions-> Editor Toggle Case

11. Run the project shortcut:

Main menu-> Run-> run

Run in Debug mode: Main menu-> Run-> debug

12. Column/Block Selection

For example, you only need to select the first five characters of the two lines.

Enable and disable: Main menu-> edit-> Column Select Mode

Alternatively, you can press and hold the Alt key without using the shortcut key, and then select the mouse.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.