IDEA shortcut key record

IDEA shortcut key record


1. ctrl+shift+alt+u to view the class diagram relationship of UML
Representation of relationships in class diagrams
2. Point the cursor on the current class and press F4 to display the hierarchy of the class
3. Code completion The
code completion function allows you to quickly complete different types of statements in the code . For example, enter a class name first, and then press Ctrl+Space to complete it. When multiple options are available, they will be displayed in the lookup list.
4. FindUsages ( find usage )
You can quickly find all uses of a specific class, method or variable in the entire project, just position the caret at the symbol The name of the place or the place of use in the code, and then press Ctrl+G (Edit | Find | Find Usages)
5. QuickJavaDoc ( Quick java document )
To quickly view the documentation of the class or method at the insertion symbol, press Ctrl+Shift+Space ( View | Quick Documentation)
6. FileStructurePopup ( File Structure Popup )
through Ctrl+F3 (Navigate | File Structure) , you can quickly navigate in the currently edited file.
It displays the list of members of the current class. Choose an element you want to navigate to, then Press Enter or F12 .
To easily find an item in the list, just start typing its name.
7. Rename ( rename )
You can easily rename your classes, methods and variables, and automatically correct all the locations where they are used.
To do this, place the caret at the symbol you want to rename, and press Alt+Shift+R (Refactor | Rename) . Enter a new name in the pop-up window that appears, or select a suggested name, and press Enter.
8. OverrideImplementMethods ( override/implementation methods )
You can easily override the methods of the base class by pressing Ctrl+O in default keymap (Code | Override Methods ).
To implement the methods of the interface inherited by the current class (or methods of the abstract class), use Alt+Shift+P ( Code | Implement methods ).
9, SmartTypeCompletion (intelligent type completion)
press Alt+Shift+Space , By analyzing the expected type of the entire expression, smart type code completion greatly helps to find methods and variables applicable in the current context. In doing so, IntelliJ IDEA will determine the top five most suitable results and highlight them on a blue background.
10. AltInsertInEditor ( code generation
in the editor) Using Alt+Insert (Code | Generate ) in the editor , you can easily generate getter and setter methods for any field in the class.
11. SelectIn ( Select )
To select the currently edited element (class, file, method or field) in any view (Project view, Structure view or others), press Alt+F1 .
12, SurroundWith ( surround )
when you want to capture some of the code fragment within the thrown exception, in the editor to select and press the Alt + the Shift the Z + (Code | With Surround ) and select the try / catch. Catch blocks for all exceptions thrown inside the code block will be automatically generated.
You can customize the body of the generated catch block in the Code tab of File | Settings | File and Code Templates.
13, SmartTypeAfterNew( Intelligent type completion after new )
Capable code completion can be used after the new keyword to instantiate an object of the desired type.
Press Alt+Shift+Space :
14. GoToImplementation ( go to implementation )
to navigate to the implementation of the abstract method, locate the caret where it is used or the declared name, and then press Ctrl+T .
15, CtrlW (expanded exhibition select )
the Alt + the Shift + up arrow (extended selection) at the caret word in the editor, and then expanded in the source selection region. For example, it might choose the method name, then the expression that calls the method, then the entire statement, and then the code block that contains the statement, and so on. You can also double-click the target area in the editor to select the word at the caret and expand the area in the source code.
16. IntroduceVariable ( introduction of variables )
extraction variable reconstruction can help you simplify complex statements in the code. For example, in a code snippet, you can select an expression in the code:
then press Alt+Shift+L (Refactor | Extract | Variable...).
17, CommentCode ( comment code )
You can use Ctrl+/ and Ctrl+Shift+/ to comment/uncomment lines or code blocks.
Ctrl+/ Use single line comment (//...) to comment or uncomment the previous line or the selected block.
Ctrl+Shift+/ Surround the selected block with block comments (/ /).
To cancel a block comment, press Ctrl+Shift+/ inside the comment.
18. ExternalJavaDoc ( external java document )
To open the document of the element at the insertion symbol in the browser, press Shift+F2 (View | External Documentation).
To use this feature, you must configure the browser path in the File | Settings | Web Browsers option, and add the document file to the project in (File | Project Structure...).
19. VariableNameCompletion ( variable name completion )
when you declare When variable, the code completion function can provide a suggested name for it. For example, start typing

private FileOutputStream

Then press Ctrl+Space .
20. JumpToLastEdit** (Jump to the last edit**)
Ctrl+Q (Navigate | Last Edit Location) can take you back to the last place you changed in the code.
Pressing Ctrl+Q multiple times allows you to drill down into your change history.
21. HighlightUsagesInFile ( highlight usage in the file )
Use Alt+Shift+O (Edit | Find | Highlight Usages in File) to quickly highlight the use of some variables in the current file.
Use Ctrl+K and Ctrl+Shift+K to navigate between highlighted uses.
Press Esc to remove the highlight.
22. ContextInfo ( Context Info )
press Alt+Q (View | Context Info) to view the declaration of the current method without scrolling to the method declaration.
23. RecentFiles ( Recent Files )
Ctrl+E (View | Recent Files) brings up a pop-up window with a list of recently visited files. Select the desired file and press Enter to open it.
In addition to the most recent files, you can also find out the results of the most recently used search. To do this, when the Find tool (ctrl+G) window has focus, use the same Ctrl+E, and then select the desired usage search result from the Recent Find Usages pop-up window.
24. NextPrevError ( next/previous error )
use F2 in default keymap/Shift+F1 to jump between the highlighted syntax errors.
Use Ctrl+Alt+up arrow in default keymap/Ctrl+Alt+down arrow in default keymap to jump before compiling error messages or search operation results.
To skip the warning, right-click the verification sidebar/marker bar and select Go to high priority issues only.
25. InsertLiveTemplate ( insert code template )
If you don't remember the complete abbreviation, you can use Ctrl+Alt+Shift+J to complete any valid Live Template (code template) abbreviation. For example, type it and press Ctrl+Alt+Shift+J to see what happens.
26. CodeCompletionMiddle ( Intermediate code completion )
When using basic code completion ( Ctrl+space) , you can enter any character at any position in any identifier.
27, oinLines (connection lines) bold style
Ctrl+Shift+JCombine the two lines into one line, and remove unnecessary spaces to match your code style.
28. ClipboardStack ( Clipboard Stack )
Use Ctrl+Shift+V to select from the recent clipboard content and insert it into the text.
29. EvaluateExpressionInEditor ( evaluation expression in the editor )
To easily calculate the value of any expression when debugging a program, please select its text in the editor (you may press Alt+Shift+up arrow several times to perform this operation efficiently ), and then press Ctrl+U .
30, QuickEvaluateExpression ( quick calculation expressions )
to quickly calculate the value of any expression when debugging program, press hold the Alt key and click this expression to see its value, evaluate expressions, calling methods.
31. QuickJavaDocInLookups ( Quick java documents in the list )
shortcut keys such as Ctrl+Shift+Space (View | Quick Documentation), Ctrl+P in default keymap (View | Parameter Info), F3 (Navigate | Declaration), etc., can be used In the editor, it can also be used for code completion in the pop-up window.
32, GoToSymbol(Go to Symbol )
To open a specific method or field in the editor, press Ctrl+Alt+Shift+N (Navigate | Symbol) and enter its name.
Select the symbol from the drop-down list that appears.
33. ImageFileCompletion ( image file completion )
in HTML, CSS and other files, use Basic Completion ( Ctrl+space) to complete the image file name
34, CompleteStatement ( completion statement )
use Ctrl+Shift+Enter To complete the current statement (such as if, do-while, try-catch, return (or method call)) into a grammatically correct structure (such as adding braces).
35. CtrlShiftI ( Quick Definition )
Using Ctrl+Shift+I (View | Quick Definition), you can quickly view the definition or content of the symbol where the caret is located without opening it in a new editor tab.

Guess you like

Origin blog.csdn.net/u011930054/article/details/88206703