Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.
Edit shortcut keys
Edit class shortcut keys | introduce |
---|---|
psvm + Tab | Generate the main method |
sout + tab | Generate output statement |
Ctrl+X / Ctrl + Y | To delete a line |
Ctrl+D | Copy one line |
Ctrl + / or Ctrl + Shift + / | Commented code |
Ctrl + Z | undo |
Ctrl + Shift + Z | Cancel to cancel the |
Ctrl + C | copy |
Ctrl + V | paste |
Ctrl + O | Overriding methods |
Ctrl + I | Implementation method |
Ctr + shift + U | Case conversion |
Ctrl + Shift + J | Integrate the two actions in one line |
Ctrl + Shift + space | Automatic code completion |
Alt + enter | Import package, automatic correction |
Alt + / | Code hinting |
Alt + Insert | Generate code (such as GET,SET methods, constructors, etc.) |
Ctrl + Alt + L | Formatting code |
Ctrl + Alt + I | Automatic indentation |
Ctrl + Alt + T | Generate a try catch |
Ctrl + Alt + O | Optimize imported classes and packages |
fori | Generates a for loop for (int I = 0; i< ; |
iter | Generate an enhanced for loop |
itar | Generates an array for code block |
itit | Generate iterator iterations |
itli | Generates a traversal of List |
itco | Generating a Collection iteration |
Find and replace shortcut keys
Find and replace class shortcuts | introduce |
---|---|
Ctrl + F | Search in the current file |
Ctrl + Shift + F | Find text throughout the project or in a specified window |
Ctrl + N | Look for classes in your project |
Ctrl + Shift + N | Find files |
Ctrl + R | Text replacement in the current file |
Ctrl + Shift+R | Replaces text in the specified window |
Ctrl + W | Automatically selects code syntactically |
Ctrl + Shift + W | Automatically selects code syntactically in reverse |
Ctrl + G | Positioning line |
Ctrl + Shift + Backspace | Jumps to last edited location |
Ctrl + alt + ←/→ | Jump back and forth to edited places |
Ctrl + Shift + Alt + N | Find variables/methods |
Alt + F7 | Find all references to your function or variable or class |
Alt + F3 | Highlight all the selected text, press Enter to select the next one, and press Esc to highlight and disappear |
F4 | Look up the source of the variable in the current class |
Ctrl + Shift + F7 | Highlight all the selected text and press Esc to highlight and disappear |
Double-click on the Shift | Find anything |
3. Compile and run class shortcut keys
Compile and run class shortcuts | introduce |
---|---|
Ctrl + F9 | Compile the project |
Ctrl + Shift + F9 | Compile the current file |
Shift + F10 | Normal boot |
Alt + Shift + F10 | The Run option menu is displayed |
Shift + F9 | Start in Debug mode |
Alt + Shift + F9 | Select the Debug |
4. Debug shortcut
The Debug shortcuts | introduce |
---|---|
F7 | In Debug mode, enter the body of the current method if the current line breakpoint is a method, not the inline method if the method body has other methods |
Shift + F7 | Intelligence into |
Alt + Shift + F7 | Forced into |
F8 | In Debug mode, the current method body is not entered if the current line breakpoint is a method |
Shift + F8 | Step out |
Alt + Shift + F8 | Mandatory step over |
alt + F8 | In Debug mode, select view value |
Ctrl + Shift + F8 | Check the breakpoint |
F9 | In Debug mode, the program is restarted. Stop at the next breakpoint if the code below that breakpoint still has a breakpoint |
Alt +F9 | Run to the cursor position |
Ctrl + Alt+ F9 | Force run to cursor |
Alt + F10 | Locating the breakpoint |
5. Refactor shortcut keys
Refactoring shortcuts | introduce |
---|---|
Shift + F6 | rename |
Ctrl + Alt + C | Extraction of constants |
Ctrl + Alt + F | Extraction of field |
Ctrl + Alt + M | Extraction method |
Ctrl + Alt + P | Extraction parameters |
Ctrl + Alt + V | Extract variable |
Other shortcut keys
Other shortcut keys | introduce |
---|---|
Ctrl + C | Copy file name |
Ctrl + Shift + C | The full path to copy the file |
Ctrl + E | Displays the most recently opened file |
Ctrl + Shift + E | Pop-up layer that displays a list of recently modified files |
Ctrl + P | Method Parameter Prompt |
Ctrl + Q | You can see the declaration of the current method |
Ctrl + Alt + Space | Class name or interface name prompt |
Ctrl + F12 | Displays the structure of the current file |
Ctrl + H | Displays the structure diagram of the current class |
Ctrl + Q | Display comment document information |
Shift + Shift | Pop up the Search Everywhere pop-up layer to find any content |
Ctrl + [ | Move the cursor to the beginning of the curly brace of the current code |
Ctrl + ] | Move the cursor to the end of the curly brace in the current code |
Ctrl + K | Version control submits an item that has been added to version control before it can be used |
Ctrl + T | Version control update project, the project must be added to version control to be able to use |
Ctrl + Tab | Switch to the edit window. If you press Delete again during the switchover, the selected window will be closed |