A complete collection of shortcut keys in IDEA

1. Ctrl

Ctrl + F Find text in the current file
Ctrl + R Replace text in the current file
Ctrl + Z Undo
Ctrl + Y Delete the line where the cursor is located or delete the selected line
Ctrl + X Cut the line where the cursor is located or cut the selection
Ctrl + C Copy the line where the cursor is or copy the selected content
Ctrl + D Copy the line where the cursor is located or copy the selected content, and insert the copied content into the code block
under the cursor position
Ctrl + W progressive selection. You can select the word or paragraph where the cursor is located, and press continuously
to expand the selected range based on the original selection
Ctrl + E Display the recently opened file record list
Ctrl + N Find the class file according to the entered class name
Ctrl + G Jump in the current file Go to the specified line
Ctrl + J Insert a custom dynamic code template
Ctrl + P The method parameter prompt displays
the variable/class name/method name where the Ctrl + Q cursor is located (you can also press it when the prompt is
added ), and the document is displayed Content
Ctrl + U goes to the method/interface definition of the parent class of the method where the current cursor is located)
Ctrl + B enters the interface or definition of the method/variable where the cursor is located, which is equivalent to Ctrl

  • Left-click
    Ctrl + K to submit the project, the project needs to be added to version control to use
    Ctrl + T version control to update the project, and this project needs to be added to version control to use Ctrl + H to display the current class hierarchy
    Ctrl + O Select the rewritable method
    Ctrl + I Select the inheritable method
    Ctrl + + Expand the code
    Ctrl + - Collapse the code
    Ctrl + / comment the line code where the cursor is located, different
    comment symbols will be used according to the current file type
    Ctrl + [ move Cursor to the start position of the curly braces of the current code
    Ctrl + ] Move the cursor to the end of the curly braces of the current code
    Ctrl + F1 Display an error message at the error code where the cursor is located
    Ctrl + F3 Switch to the next quotation of the selected word Position
    Ctrl + F4 Close the currently edited file
    Ctrl + F8 In Debug mode, set the current behavior of the cursor as a breakpoint, if it is already
    a breakpoint, remove the breakpoint
    Ctrl + F9 Execute the Make Project operation
    Ctrl + F11 Select the file/folder, Use mnemonics to set/cancel bookmarks
    Ctrl + F12 pops up the current file structure layer, you can directly input on the popped up layer to filter
    Ctrl
    + Tab editing window switching, if you press delete again during the switching process, it will be
    Close the corresponding selected window
    Ctrl + End Jump to the end of the file
    Ctrl + Home Jump to the file header
    Ctrl + Space Basic code completion, the default is occupied by the input method on the Windows system, it
    needs to be modified, it is recommended to change to Ctrl + comma
    Ctrl + Delete Delete the word or Chinese sentence behind the cursor
    Ctrl + BackSpace Delete the word or Chinese sentence in front of the cursor
    Ctrl + 1,2,3...9 Locate the bookmark position corresponding to the value
    Ctrl + Left click on the title of the opened file, the file path will pop up Ctrl + Cursor positioning Press Ctrl and hold on On, the class information summary where the cursor is located will be displayed
    Ctrl + left arrow key cursor jumps to the left beginning of the current word/Chinese sentence (
    Ctrl + right arrow key cursor jumps to the right beginning position of the current word/Chinese sentence
    Ctrl + The front arrow key is equivalent to the mouse wheel forward effect
    Ctrl + the rear arrow key is equivalent to the mouse wheel backward effect
    2. Alt

Alt + Q pops up a prompt to display the declaration/context information of the current class
Alt + F1 displays the current file selection target pop-up layer, there are many targets in the pop-up layer for selection
Alt + F2 For the previous page, it displays various browsers to open the target selection Pop-up layer
Alt + F3 Select the text, find the same text one by one, and highlight
Alt + F7 Find the method/variable/class where the cursor is located
Alt + F8 In the Debug state, select the object, pop up to enter Calculate the expression debugging box, view the debugging
results of the input content
Alt + Home Locate/display to the Navigation Bar of the current file
Alt + Enter IntelliJ IDEA provides quick fix options according to the problem where the cursor is located, and the results of different prompts when the cursor is placed
It is also different from
the automatic generation of Alt + Insert code, such as the set / get method of the generated object, the constructor, toString(), etc.
Alt + the left arrow key to switch the subviews in the currently opened window, such as Output, Debugger, etc. in the Debug window Press
Alt + right arrow key to switch subviews in the currently opened window. For example, there are subviews such as Output and Debugger in the Debug window. Use this shortcut key to switch between subviews. Alt + front arrow key The current cursor
jumps Go to the previous method name position of the current file
Alt + the back arrow key The current cursor jumps to the next method name position of the current file
Alt + 1, 2, 3...9 to display the tabs of the corresponding values, among which 1 is the most used by Project
3. Shift

Shift + F1 If there is an external document, you can connect to the external document
Shift + F2 Jump to the previous highlighted error or warning position
Shift + F3 In Find mode, find a match for the previous
Shift + F4 For the currently open file, use a new Windows window Open, keep the old window
Shift + F6 to rename the file/folder
Shift + F7 in Debug mode, smart stepping. There are multiple method calls on the line where the breakpoint is located, which method will pop up
Shift + F8 In Debug mode, jump out, and the effect shown is the same as F9
Shift + F9 is equivalent to clicking the Debug button on the toolbar
Shift + F10 is equivalent Click the Run button on the toolbar
Shift + F11 Pop up the bookmark display layer
Shift + Tab Unindent
Shift + ESC Hide 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 head position
Shift + Enter to start a new line. There is a blank line under the line where the cursor is located, and the cursor is positioned at a new line.
Shift + left-click on the opened file name and press this shortcut key to close the currently open file.
Shift + scroll wheel scrolls the horizontal scroll axis of the current file forward and backward.
4. Ctrl + Alt

Ctrl + Alt + L to format the code, you can use
Ctrl + Alt + O to optimize the imported class for the current file and the entire package directory, you can use
Ctrl + Alt + I for the current file and the entire package directory to automatically execute the line where the cursor is located or the selected part Code indentation, somewhat similar to formatting
Ctrl + Alt + T Pop up the surround option for the selected code Pop-up layer
Ctrl + Alt + J Pop up the template selection window, add the selected code to the dynamic template
Ctrl + Alt + H Call the hierarchy
Ctrl + Alt + B used on a method name of a call will jump to the specific implementation, you can skip the interface
Ctrl + Alt + C Refactoring - Quickly extract constants
Ctrl + Alt + F Refactoring - Quickly extract member variables
Ctrl + Alt + V Refactor - Quickly extract variables
Ctrl + Alt + Y Synchronize, refresh
Ctrl + Alt + S Open IntelliJ IDEA System Settings
Ctrl + Alt + F7 Display where used. Find the place where the class or variable is called, and find it with a pop-up box
Ctrl + Alt + F11 Switch to full-screen mode
Ctrl + Alt + Enter A line is left on the line where the cursor is located, and the cursor is positioned on a new line

Ctrl + Alt + Home pops up the file popup layer associated with the current file
Ctrl + Alt + Space class name auto-complete
Ctrl + Alt + left arrow key returns to the previous operation
Ctrl + Alt + right arrow key forwards the previous operation Ctrl
+ Alt + forward arrow key In search mode, jump to the previous searched file
Ctrl + Alt + back arrow key In search mode, jump to the next searched file
Ctrl + Alt + closing bracket (]) In When multiple projects are open, switch the next project window
Ctrl + Alt + left bracket ([) When multiple projects are open, switch the previous project window
5. Ctrl + Shift

Ctrl + Shift + F Find the entire project or files in the specified directory
according to the input content Ctrl + Shift + R Replace the corresponding content according to the input content, the range is the entire project or files in the specified directory
Ctrl + Shift + J Automatically merge the next line into the current line End
Ctrl + Shift + Z Undo
Ctrl + Shift + W Progressively deselect code blocks. You can select the word or paragraph where the cursor is located, and press Ctrl + Shift + N continuously to locate/open the file/directory through the file name on the basis of the original selection . To open the directory, you need to add a forward slash Ctrl + Shift + U
after the input content
Alternate uppercase/lowercase conversion for selected code
Ctrl + Shift + T Generate unit test class for current class, if there is an existing unit test class, you can select it
Ctrl + Shift + C Copy current file disk path to clipboard
Ctrl + Shift + V to pop up the most recently copied content manager popup for the cache
Ctrl + Shift + E to show the popup for the list of recently modified files
Ctrl + Shift + H to show the method hierarchy

Ctrl + Shift + B Jump to type declaration
Ctrl + Shift + I Quickly view the definition of the method or class under the cursor
Ctrl + Shift + A Find action/setting
Ctrl + Shift + / Code block comment
Ctrl + Shift + [ Select from Cursor position to its top bracket position
Ctrl + Shift + ] Select from cursor position to its bottom bracket position
Ctrl + Shift + + Expand all codes
Ctrl + Shift + - Collapse all codes
Ctrl + Shift + F7 Highlight Display all the selected text, press Esc to disappear the highlight
Ctrl + Shift + F8 In Debug mode, specify a breakpoint entry condition
Ctrl + Shift + F9 Compile the selected file/package/Module
Ctrl + Shift + F12 Maximize the editor
Ctrl + Shift + Space Smart code prompt
Ctrl + Shift + Enter Automatically end the code, automatically add a semicolon at the end of the line
Ctrl + Shift + Backspace Back to the last modified place
Ctrl + Shift + 1,2,3...9 Quickly add a bookmark of the specified value
Ctrl + Shift + left click to place the cursor on a certain class variable, press this shortcut key to directly navigate
to the class
Ctrl + Shift + left arrow key on the code file, the cursor jumps to the current word/Chinese sentence Left
Press
Ctrl + Shift + right arrow key on the code file, and the cursor jumps to the
beginning position of the right side of the current word/Chinese sentence, and select the word/Chinese sentence at the same time
Ctrl + Shift + front Put the arrow key cursor on the method name, move the method to the front of the previous method, and
adjust the method sorting
Ctrl + Shift + the back arrow key cursor on the method name, move the method to the front of the next method, and
adjust the method sorting

Alt + Shift + N Select/add task
Alt + Shift + F Display Add to Favorites pop-up layer / Add to Favorites
Alt + Shift + C View the list of changes to recently operated items
Alt + Shift + I View the current file of the project
Alt + Shift + F7 In Debug mode, the next step is to enter the current method body. If there are methods in the method body, it will enter the embedded method, and then enter
Alt + Shift + F9 to pop up the optional menu of Debug
Alt + Shift + F10 Pop up the optional menu of Run
Alt + Shift + left double-click to select the double-clicked word/Chinese sentence, press and hold, you can select other words/Chinese sentences at the same time
Alt + Shift + front direction key to move the line where the cursor is located up Move
Alt + Shift + the back arrow key to move the line where the cursor is located to move down
Six, Ctrl + Shift + Alt

Ctrl + Shift + Alt + V Paste without formatting
Ctrl + Shift + Alt + N Go to the specified variable/method
Ctrl + Shift + Alt + S Open the current project settings
Ctrl + Shift + Alt + C Copy reference information
7. Others

F2 Jump to next highlighted error or warning location
F3 In Find mode, navigate to next match
F4 Edit source

Guess you like

Origin blog.csdn.net/qq_34690003/article/details/131685111