Referenced from: 52333601
positioning, switching, inheritance relationships, calling relationships, finding and replacing, navigating navigation, search, replace, and moreFirst, entry or return method (1) Brief introduction
- Ctrl+b: View method definition or Return method call place (with Ctrl + click equivalent); (bidirectional)
- ctrl+alt+b: Ctrl+alt+b enters the definition of the interface or subclass of the class or sub-method , and (unidirectional) enters the override place;
- ctrl+f12 : View all methods of the current class ;
- Ctrl+h: Displays the current class inheritance relationship structure diagram;
- Ctrl+q: Displays the doc comment description on the class/method/variable;
(2) Detailed introduction
- ctrl+b: View method definition or Return method call place (with Ctrl + click equivalent)
Go to the place where the cursor is defined or return to the place where the method is used (instead of Ctrl + Mouse click Method to enter the way, to avoid the finger between the keyboard and mouse switch , very useful shortcut keys)
Further explanation: The View method definition is unique, go directly in, but return, because there may be multiple calls to the method, so there will be a list, the call that just entered will be selected by default.
?
- Ctrl+alt+b:ctrl+alt+b into the definition of a subclass or sub-method of the interface or class;
- Ctrl+f12 See all the methods of the current class; benefit: You can quickly find a method of the class.
- Ctrl+h shows the structure diagram of this kind of inheritance relationship;
- CTRL+Q Displays the doc comment description on the class/method/variable;
Second, search, find and replace Search/replace
- Global Search:
- Double Shift: Search everywhere, global searching, including class name, filename, file content, etc.;
- CTRL + N: Search for class files: *.java;
- Ctrl+shift+n: Search for arbitrary files: * *;
- Recently opened files
- ctrl+tab: Toggle the recently opened file, switcher;
- ctrl+e: To view recently opened files, select the upper and lower keys, enter to open the file.
- alt+left/right: The window has been opened by the switch of the file.
- In-File search, find, and replace
- ctrl+g : Navigate to a row, go to line ;
- Ctrl + f/r: Find and replace inside the file;
After you add the shift:Ctrl + Shift + f/r: Represents a Find or replace in the current project engineering.
after the search, use F3 and Shift+f3 switch quickly.
F3 : Find Next ; Shift+f3 : Find Previous
?
Third, cursor positioning
- Ctrl+alt+left/right: Cursor is positioned at the previous/next browse location ;
- Ctrl+shift+backspace: The cursor is positioned to the place where it was last modified ;
- Alt+up/down: Moves the cursor to the previous/next method starting point;
ctrl+f12 : is a list of all methods of the current class;
- Ctrl+left/right: Move the cursor to the previous/next word,
Ctrl+shift+left/right: Add Shift key to create a continuous selection effect;
- CTRL + + + or-: Current method Expand/collapse, add Shift key, all methods expand/collapse;
- ctrl+[or]: Move the cursor to the front/back code block, add Shift key, produce the selected effect;
Used to determine the correspondence of curly braces;
- F2: Quickly navigate to the next error and warning, add Shift key, and navigate to the previous error;
- Ctrl+w the code by the syntax, the continuous press will have other effects, plus shift key, to produce a reverse selection effect
- Ctrl+alt+v suggest that the selection is a local variable
Iv. deletion and insertion
- Ctrl+d: Copy the current line or copy the selection;
- Ctrl+y: Delete the current row;
- Alt+shift+up/down: Moves the current line up/down or moves the selected line ;
- Ctrl+shift+up/down : whole up/down Move statement block/method;
like for statement block, overall move for statement block;
If the cursor is on the method definition line, move the method as a whole.
- ctrl+alt+t: In the case of the selected code, Surround with (if/else/try catch ...) quick package code;
- Ctr+shift+u: Case Conversion
- ctrl+backspace: Delete by word;
BACKSPACE is deleted by character;
- Shift+enter: Insert new line down, smart enter, no matter where the cursor is in the current line;
Enter is the direct carriage return;
Ctrl+shift+enter: First complete the current line code, and then insert a new row;
- Ctrl+alt+enter Insert new Row up
Wu, Navigation
?
IntelliJ idea will be shortcut keys, multiply improve the development efficiency