IntelliJ idea common shortcut keys

Time:2021-10-21

One of the reasons why idea is difficult for novices may be that there are many and complex shortcut key combinations, but it is also very complete. Basically all functions can be completed through shortcut keys. It can be said that if you master the use of all shortcut keys of idea, you can completely lose the mouse without affecting the development efficiency.

1、 CTRL shortcut

CTRL + F find text in current file (required)
CTRL + R replace text in current file (required)
CTRL + Z undo (required)
CTRL + y delete the line where the cursor is located or delete the selected line (required)
CTRL + X cuts the line where the cursor is located or cuts the selection
CTRL + C copy the line where the cursor is located or copy the selection
CTRL + D copy the line where the cursor is located or copy the selection, and insert the copied content under the cursor position (required)
CTRL + W progressive selection of code blocks. You can select the word or paragraph where the cursor is located. Pressing continuously will expand the selection range based on the original selection (required)
CTRL + e displays a list of recently opened file records (required)
CTRL + n find the class file according to the entered name / class name (required)
CTRL + G jump to the specified line in the current file
CTRL + J insert custom dynamic code template (required)
CTRL + P method parameter prompt display (required)
CTRL + Q cursor on the variable / class name / method name, etc. (you can also press when prompted to supplement) to display the document content
CTRL + u go to the method / interface definition of the parent class of the method where the current cursor is located (required)
CTRL + B enters the interface or definition of the method / variable where the cursor is located, which is equivalent to Ctrl + left click (required)
CTRL + K submit a project for version control. This project can only be used if it is added to version control
CTRL + T version control update item. This item can only be used if it is added to version control
CTRL + H displays the hierarchy of the current class
CTRL + O select overridable method
CTRL + I select inheritable methods
CTRL + + expand code
CTRL + - collapse code
CTRL + / release the code in the line of the cursor. Different comment symbols will be used according to different file types (required)
CTRL + [move the cursor to the beginning of the curly bracket of the current code
CTRL +] move the cursor to the end of the curly bracket of the current code
CTRL + F1 displays an error message at the error code where the cursor is located (required)
CTRL + F3 transfer to the next reference position of the selected word (required)
CTRL + F4 close the currently edited file
CTRL + F8 in the debug mode, set the current behavior breakpoint of the cursor. If it is already a breakpoint, remove the breakpoint
CTRL + F9 execute make project operation
CTRL + F11 select a file / folder and use mnemonics to set / cancel bookmarks (required)
CTRL + F12 pops up the current file structure layer. You can enter directly on the pop-up layer to filter
CTRL + Tab edit window switching. If you press Delete during the switching process, the corresponding selected window will be closed
CTRL + end skip to end of file
CTRL + home jump to file header
The basic code of Ctrl + space is completed. By default, it is occupied by the input method on the windows system and needs to be modified. It is recommended to modify it to Ctrl + comma (required)
CTRL + delete deletes the word or Chinese sentence behind the cursor (required)
CTRL + backspace delete words or Chinese sentences in front of the cursor (required)
CTRL + 1,2,3... 9 to locate the bookmark position of the corresponding value (required)
CTRL + left click on the open file title to pop up the file path (required)
CTRL + cursor positioning press Ctrl and do not release it. The summary of the class information where the cursor is located will be displayed
CTRL + left arrow key cursor jumps to the left beginning of the current word / Chinese sentence (required)
CTRL + right arrow key cursor jumps to the right beginning of the current word / Chinese sentence (required)
CTRL + front arrow key is equivalent to mouse wheel forward effect (required)
CTRL + back arrow key is equivalent to mouse wheel backward effect (required)

2、 ALT shortcut

Alt + ` display version control common operation menu pop-up layer (required)
Alt + Q pop up a prompt to display the declaration / context information of the current class
Alt + F1 displays the pop-up layer of the current file selection target. There are many targets in the pop-up layer that can be selected (required)
Alt + F2 for the previous page, display all kinds of browser open target selection pop-up layer
Alt + f3select the text, look down one by one for the same text, and highlight it
Alt + F7 find the place where the method / variable / class where the cursor is called
Alt + F8 in the debug status, select the object and pop up the debug box for inputting calculation expression to view the debugging results of the input content
Alt + home navigate / display to the navigation bar of the current file
Alt + enter IntelliJ idea provides quick repair options according to the problem where the cursor is located. The prompt results are different according to the position of the cursor (required)
Alt + insert code is automatically generated, such as set / get method, constructor, tostring() and so on (required)
Alt + left arrow key to switch the sub view in the currently open window. For example, there are sub views such as output and debugger in the debug window. You can switch in the sub view with this shortcut key (required)
Press Alt + right arrow key to switch the sub view in the currently open window. For example, there are sub views such as output and debugger in the debug window. You can switch in the sub view with this shortcut key (required)
Alt + front arrow key, the current cursor jumps to the previous method name position of the current file (required)
Alt + back arrow key, the current cursor jumps to the next method name position of the current file (required)
Alt + 1,2,3... 9 displays the tabs of corresponding values, where 1 is the most used by project (required)

3、 Shift shortcut

Shift + f1if there is an external document, you can connect the external document
Shift + F2 jumps to the previous highlighted error or warning position
Shift + f3in find mode, find a match to the previous one
Shift + F4 use the new windows window to open the currently open file, and keep the old window
Shift + F6 rename file / folder
Shift + F7 in debug mode, smart step in. If there are multiple method calls on the line where the breakpoint is located, which method will pop up
Shift + F8 jumps out in debug mode, and the effect is the same as F9
Shift + F9 is equivalent to clicking the debug button on the toolbar
Shift + F10 is equivalent to clicking the run button on the toolbar
Shift + F11 pop up bookmark display layer (required)
Shift + Tab cancel indent (required)
Shift + ESC hides the current or last active tool window
Shift + end select the cursor to the end of the current line
Shift + home select the cursor to the current line header position
Shift + enter to start a new line. A line is left under the line where the cursor is located, and the cursor is positioned to the position of the new line (required)
Shift + left click press this shortcut key on the open file name to close the currently open file (required)
Shift + scroll wheel to scroll back and forth the horizontal scroll axis of the current file (required)

4、 CTRL + Alt shortcut

CTRL + Alt + L format code, which can be used for the current file and the entire package directory (required)
CTRL + Alt + O optimize the imported class, which can be used for the current file and the entire package directory (required)
CTRL + Alt + I the line where the cursor is located or the selected part is indented automatically, which is a bit similar to formatting
CTRL + Alt + T pop up the surround option pop-up layer for the selected code (required)
CTRL + Alt + J pop up the template selection window to add the selected code to the dynamic template
CTRL + Alt + H call hierarchy
CTRL + Alt + B used on the method name of a call will jump to the specific implementation, and the interface can be skipped
CTRL + Alt + V quick import variable
CTRL + Alt + y sync, refresh
CTRL + Alt + s to open IntelliJ idea system settings (required)
CTRL + Alt + F7 show where to use. Find the place where the class or variable is called and find it in a pop-up box
CTRL + Alt + F11 switch to full screen mode
CTRL + Alt + enter a line appears above the line where the cursor is located, and the cursor is positioned to a new line (required)
CTRL + Alt + home pop up the file pop-up layer associated with the current file
CTRL + Alt + space class name auto complete
CTRL + Alt + left arrow key to return to the place of the previous operation (required)
CTRL + Alt + right arrow key to advance to the place of the previous operation (required)
CTRL + Alt + front arrow key in find mode, jump to the last found file
CTRL + Alt + back arrow key in find mode, skip to the next found file

5、 CTRL + Shift shortcut

CTRL + Shift + F find the entire project or files in the specified directory according to the input (required)
CTRL + Shift + R replace the corresponding content according to the input content, ranging from the whole project or files in the specified directory (required)
CTRL + Shift + J automatically merge the next row to the end of the current row (required)
CTRL + Shift + Z cancel undo (required)
CTRL + Shift + W progressive deselect code blocks. You can select the word or paragraph where the cursor is located, and pressing continuously will expand the unchecked range based on the original selection (required)
CTRL + Shift + n locate / open the file / directory through the file name. To open the directory, you need to add a forward slash after the input content (required)
CTRL + Shift + u to convert the selected code in turn (required)
CTRL + Shift + t generate a unit test class for the current class. You can select an existing unit test class (required)
CTRL + Shift + C copy the current file disk path to the clipboard (required)
CTRL + Shift + V ejects the most recently copied content manager layer of the cache
CTRL + Shift + e displays the pop-up layer of the recently modified file list
CTRL + Shift + H displays the method hierarchy
CTRL + Shift + B jump to type declaration (required)
CTRL + Shift + I quickly view the definition of the method or class where the cursor is located
CTRL + Shift + a find actions / settings
CTRL + Shift + / code block comments (required)
CTRL + Shift + [check from the cursor position to its top bracket position (required)
CTRL + Shift +] check from the cursor position to its bottom bracket position (required)
CTRL + Shift + + expand all code (required)
CTRL + Shift + - collapse all code (required)
CTRL + Shift + F7 highlight all the selected text and press ESC to highlight it (required)
CTRL + Shift + F8 in debug mode, specify breakpoint entry conditions
CTRL + Shift + F9 compile the selected file / package / module
CTRL + Shift + F12 editor maximization (required)
CTRL + Shift + space smart code prompt
CTRL + Shift + enter automatically ends the code, and a semicolon is automatically added at the end of the line (required)
CTRL + Shift + backspace return to the last modified place (required)
CTRL + Shift + 1,2,3... 9 quickly add bookmarks with specified values (required)
CTRL + Shift + left click to place the cursor on a class variable. Press this shortcut key to directly locate the class (required)
CTRL + Shift + left arrow key on the code file, the cursor jumps to the left beginning of the current word / Chinese sentence, and selects the word / Chinese sentence (required) 
CTRL + Shift + right arrow key on the code file, the cursor jumps to the right beginning of the current word / Chinese sentence, and selects the word / Chinese sentence (required)
CTRL + Shift + front arrow key, place the cursor on the method name, move the method to the front of the previous method, and adjust the method sorting (required)
CTRL + Shift + back arrow key, place the cursor on the method name, move the method to the front of the next method, and adjust the method sorting (required)

6、 Alt + Shift shortcut

Alt + Shift + N select / add task (required)
Alt + Shift + F show add to Favorites flyout / add to Favorites
Alt + Shift + C view the change list of recent operation items
Alt + Shift + I view the current project file
Alt + Shift + F7 in the debug mode, next, enter the current method body. If there are other methods in the method body, it will enter the embedded method, and enter the loop accordingly
Alt + Shift + F9 pop up the selectable menu of debug
Alt + Shift + F10 pop up the selectable menu of run
Alt + Shift + front arrow key move the cursor up (required)
Alt + Shift + back arrow key to move the cursor down (required)
Alt + Shift + insert column edit mode switch (required)
Alt + Shift + left click, double click and hold, you can select other words / Chinese sentences at the same time (required)
Alt + Shift + left click, hold down, and set multiple cursors at the same time (required)

7、 CTRL + Shift + Alt shortcut

CTRL + Shift + Alt + V unformatted paste (required)
CTRL + Shift + Alt + n go to the specified variable / method
CTRL + Shift + Alt + s open current project settings (required)
CTRL + Shift + Alt + C copy reference information

8、 Other shortcut keys

F2 jumps to the next highlighted error or warning position (required)
F3 in find mode, locate to the next match
F4 edit source (required)
F7 in the debug mode, enter the next step. If the breakpoint of the current line is a method, it will enter the current method body. If there are methods in the method body, it will not enter the embedded method
F8 in the debug mode, go to the next step. If the current line breakpoint is a method, it will not enter the current method body
F9 in debug mode, resume the program, but if there is a breakpoint in the code below the breakpoint, stop at the next breakpoint
F11 bookmark (required)
F12 return to the previous tool window (required)
Tab indent (required)
ESC enters the code file window from the tool window (required)
Double click shift to pop up the search everywhere pop-up layer