Common shortcut keys for android studio (as) under Windows, all shortcut keys

    I'm very happy, this is my blog debut, in the android development novice on the road, I use the blog to record some of my experience in the development process, to help everyone to do everything in the development efficiently. In the future, I will explain the knowledge that will be commonly used in future development, and provide some work experience summaries for small partners who are ready to enter the work, so that it is convenient to understand the knowledge in advance before entering the work, and quickly put into work.

    We often cooperate with shortcut keys in development to improve development efficiency, which is not only cool, but also very practical. Because in our development, we need to add, delete, check, modify, move, comment, etc. to the code. Using shortcut keys can greatly improve our efficiency, so the commonly used shortcut keys must be tried and used. Look at the shortcut keys For the effect, it is necessary to memorize the shortcut keys. We may all use them in the future, and we can also get a general understanding (you must agree with this, haha), but you must try the effect. When you use it later, you will know that there is this shortcut key. Find out how to use it.

Alt+Enter -------------Import package, auto-correct (*required)

        This is used very frequently. When typing the code, the package must be imported; there is also automatic correction. If there is an error or warning in the code, press this key to solve it; you can also spilt variables and so on. Split into declaration and assignment

        

Ctrl+Alt+L------------Format code (*required)

        Formatting code, beautifying, must be done

Ctrl+Alt+O-----------Optimizing imported classes and packages
         can quickly import packages and delete unused packages that are grayed out. Suggestion: Set it to automatic package import in the settings, do not manage it manually (there are multiple packages that need to be manually selected)

Alt+Insert-------------Generate code (such as get, set method, construct Functions, etc.) (*required)
       Writing a bean definitely requires get, set methods, constructors, and sometimes overriding methods. This key is also required to bind controls using ButterBnife.

Ctrl+E or Alt+Shift+C--------Recently changed code


Ctrl+R--------Replace text (*required)
        Batch modify the same text

Ctrl +F------------ Find Text

Ctrl+N------------ Find Class

        Quickly locate the class

Ctrl+Shift+N------------Find files


Ctrl+Shift+Space-----------Auto-completion code


Ctrl+Space-----------Code prompt


Ctrl+Alt+Space---------- -Class name or interface name prompt


Ctrl+P-----------method parameter prompt (*required)
        to show what the parameters are, you need to look at the parameters when filling in the parameters, you can also press Ctrl and click to see parameter.

Ctrl+Shift+Alt+N--------Find a method or variable in a class


Alt+Shift+C--------Compare recently modified code


Shift+F6- ---------- Refactoring-Rename (*required)
          Change the name, and then automatically help modify the name associated with this (file or id, etc.), very useful

Ctrl+Shift+Up/Down- ---------- Move this line of code up and down
        

Ctrl+D-------- Copy a line of code to the next line, the clipboard does not save this line of code (*must remember)


Ctrl+X------------ cut, delete line, clipboard save this line of code (*must remember)


Ctrl+Y------------Delete a line, the clipboard does not save this line of code (*required)

Ctrl+/ or Ctrl+Shift+/ Comment (// or)------- ---Comments (*required)
        // /* */ Two kinds of comments

Ctrl+J--------automatic code
        The next article will use this automatic code, just to generate code quickly, It's also cool to use.


Ctrl+H------------Display class structure diagram

Ctrl+F12----------- can display the structure of the current file

        Can be used to quickly preview variables and methods, and quickly locate jumps

Ctrl+Q-----------Display comment document


Alt+F1------------Find the location of the code


Alt+1-----------quick Open or hide the project panel


Ctrl+Alt+ left/right-----------Return to the last browsed position (practical)


Alt+ left/right-------------Switch code view


Alt+ Up/Down--------Quickly move positioning between methods



F2 or Shift+F2-----------Highlight errors or warnings to quickly locate (practical)


Alt+F7------------ Find where this (file or method id, etc.) is used (practical)


Ctrl+Alt+T------------- can wrap the code in one piece, such as try/catch (practical)



Ctrl+Shift+F7------------Select the text, press Ctrl+Shift+F7, highlight all the text, press Esc to highlight disappear.


Ctrl+W--------select the code, press continuously to have other effects


Alt+F3--select the text, press Alt+F3, search down one by one for the same text, and highlight it.


Ctrl+Up/Down------------The cursor jumps to the first or last line under


Ctrl+B-----------Quickly opens the class or method at the cursor 

Okay, this is bullshit for the time being, but it's still far from enough. There is no end to learning, and experience is limited. The knowledge that you have explored yourself is the real knowledge. The following links are all the shortcut keys introduced by the official android studio. The official is the authority. Well. Shortcut keys officially provided by android studio

https://developer.android.google.cn/studio/intro/keyboard-shortcuts.html

 







Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324682646&siteId=291194637