1. Introduction
The full name of IDEA is IntelliJ IDEA, which is an integrated development environment for the Java programming language. IntelliJ is recognized as the best Java development tool in the industry, especially in intelligent code assistants, automatic code prompts, refactoring, JavaEE support, various version tools (git, svn, etc.), JUnit, CVS integration, code analysis, innovative The functions in GUI design and other aspects can be said to be extraordinary.
2. Installation
1. System requirements
-
64-bit Windows 10 1809 and later, or Windows Server 2019 and later;
-
Minimum 2 GB available RAM, 8 GB total system RAM recommended;
-
3.5 GB hard drive space, SSD recommended;
-
Minimum screen resolution 1024x768;
2. Download address
https://www.jetbrains.com/idea/download/
3. Installation instructions
-
Run the IntelliJ IDEA-2023.2.2.exe file to start the installation wizard
-
Follow all steps suggested by the wizard. Please pay special attention to the corresponding installation options
4. Installation tutorial
1). Go to JetBrains official website to download the corresponding version of IDEA
2). Double-click the installation package to enter the IDEA welcome interface and click "Next"
3). Select the installation location of IDEA and ensure there is enough space.
4). Select the installation configuration, make selections as needed, and click "Next"
5). Select the start menu and leave it as default, then click "Install" and wait patiently for the installation process.
6). Installation completed! Displaying this interface means that IDEA has been successfully installed, just click "Finish"
7). Activate IDEA
3. Configuration
1. JDK configuration
2. Maven configuration
3. Install plug-ins
4. Shortcut keys
1. Build/Compile
-
Ctrl + F9: Build project
After executing this command, IntelliJ IDEA will compile all classes in the project and output the compilation results to the out directory. IntelliJ IDEA supports incremental builds and will only compile modified classes based on the last build.
-
Ctrl + Shift + F9: Recompile the current class
Open the class to be compiled in IntelliJ IDEA, and executing this command will compile the current class.
2. 文本编辑
-
Ctrl + X
:Cut
Cut the selected text, or the current line if it is not selected.
-
Ctrl + C
:copy
Copies the selected text, or the current line if it is not selected.
-
Ctrl + V: Paste
-
Ctrl + Alt + Shift + V: Paste as plain text
-
Ctrl + Shift + V: Paste from history selection
Select content to paste from the history cut-and-paste version.
-
Ctrl + D
:Copy row
Copy the line where the cursor is.
-
Ctrl + Shift + C
:Copy file path
Copy the path of the selected file.
-
Ctrl + Alt + Shift + C
:Copy reference
Copy the path to the package, or the name of the class.
-
Ctrl + S: Save all
-
Ctrl + Z: Undo
Undo the previous step.
-
Ctrl + Shift + Z: Redo
Restore the undo contents of the previous step.
-
Tab: indent
-
Shift + Tabl: Cancel indentation
-
Ctrl + Alt + I
: Automatically indent lines
Automatically indent to standard position.
-
Shift + Enter
: Start a new line
Starts a new line regardless of whether the cursor is at the end of the line.
-
Ctrl + Alt + Enter
: Start a new line before the current line
-
Ctrl + Y
: Delete row
Delete the current row.
-
Ctrl + Shift + U
: Case conversion
-
Ctrl + Alt + Shift + Insert
:Create temporary files
Various types of temporary files can be created that are not saved to disk.
-
Shift + F4
: Open in new window
Open the current file in a new window.
3. Cursor operation
-
Ctrl + Left
: Move one word to the left
-
Ctrl + Right
: Move one word to the right
-
Home: Move to the beginning of the line
-
End: move to the end of the line
-
Ctrl + Shift + M
:Move to braces
Press the shortcut key multiple times to switch between the left and right braces.
-
Ctrl + [: Move to the beginning of the code block
-
Ctrl + ]: Move to the end of the code block
-
Alt + Down: Next method
-
Alt + Up: Previous method
-
Ctrl + PageUp: Move to the top of the page
-
Ctrl + PageDown: Move to the bottom of the page
-
PageUp: Page up
-
PageDown: Page down
-
Ctrl + Home: Move to the beginning of the file
-
Ctrl + End: Move to the end of the file
4. Text selection
-
Ctrl + A: Select all
-
Shift + Left: Select left
-
Shift + Right: Select right
-
Ctrl + Shift + Left: Select a word to the left
-
Ctrl + Shift + Right: Select a word to the right
-
Shift + Home: Select left to the beginning of the line
-
Shift + End: Select right to the end of the line
-
Shift + Up: Select upward
-
Shift + Down: Select down
-
Ctrl + Shift + [: Select to the beginning of the code block
-
Ctrl + Shift + ]: Select to the end of the code block
-
Ctrl + Shift + PageUp: Select to the top of the page
-
Ctrl + Shift + PageDown: Select to the bottom of the page
-
Shift + PageUp: Page up selection
-
Shift + PageDown: Page down selection
-
Ctrl + Shift + Home: Select to file switch
-
Ctrl + Shift + End: Select to the end of the file
-
Ctrl + W: Expand selection
-
Ctrl + Shift + W: shrink selection
5. Code folding
-
Ctrl + NumPad+: Expand code block
-
Ctrl + NumPad-: Collapse code block
-
Ctrl + Alt + NumPad+: Recursive expansion
-
Ctrl + Alt + NumPad-: recursive folding
-
Ctrl + Shift + NumPad+: Expand all
-
Ctrl + Shift + NumPad-: Collapse all
6. Multiple carets and range selections
-
Alt + Shift + Click
:Add/remove caret
-
Alt + Shift + Insert
: Switch column selection mode
-
Double-click
Ctrl
+Up
: Clone the caret upward
-
Double-click
Ctrl
+Down
: Clone the caret downwards
-
Alt + Shift + G
: Adds a caret to each line in the selection
-
Alt + J: Select where the unit will appear next
-
Alt + Shift + J: Cancel the last selection
-
Ctrl + Alt + Shift + J
: Select all occurrences
-
Alt + Shift + Middle-Click
:Create a rectangular selection
-
Alt + Click
:Drag to create a rectangular selection area
-
Ctrl + Alt + Shift + Click
:Drag to create multiple rectangular selection areas
7. Auxiliary coding
-
Alt + Enter
:Show suggested actions
-
Ctrl + Space
: Code completion
-
Ctrl + Shift + Space
: Type matching code completion
-
Ctrl + Alt + Space
: Second code completion
-
Ctrl + Shift + Enter
:Complete the current statement
-
Ctrl + Alt + L
:Formatting code
-
Ctrl + P
: Parameter information reminder
-
Ctrl + Q
:Quick Documentation
-
Ctrl + Shift + Up: Move statements up
-
Ctrl + Shift + Down: Move statements down
-
Ctrl + Alt + Shift + Left: Move elements to the left
-
Ctrl + Alt + Shift + Right: Move element to the right
-
Alt + Shift + Up: Move the queue up
-
Alt + Shift + Down: Move the queue down
-
Ctrl + /
: Add line comments
-
Ctrl + Shift + /
:Add block comment
-
Alt + Insert
:Production statement
8. Contextual Navigation
-
Alt + Down: Jump to the next method
-
Alt + Up: Jump to the previous method
-
Ctrl + G
: Jump to the specified line
-
Ctrl + Tab
:Switch active file
-
Alt + F1
: Select the location of the file
-
Ctrl + E
: recent files
-
Ctrl + Shift + Backspace
: Return to the last editing position
-
Ctrl + Alt + Left: Back
-
Ctrl + Alt + Right: Forward
-
Ctrl + Alt + Down: Next event
-
Ctrl + Alt + Up: Previous event
-
Alt + Right: Select the next tab
-
Alt + Left: Select the next tab
-
F11
:Switch anonymous bookmarks
-
Ctrl + Shift + [digit]
: Switch bookmarks with numbers
-
Ctrl + F11
: Use auxiliary words to switch bookmarks
-
Shift + F11
:Show all bookmarks
-
Ctrl + [digit]
: Jump to bookmarks with numbers
-
Alt + 7
:Show structure window
-
Alt + 3
: Display the search window
9. Search operation
-
Double-click
Shift
: Find all
-
Ctrl + F
: Find characters (current file)
-
F3: Find next
-
Shift + F3: Find previous
-
Ctrl + R
: Replace character (current file)
-
Ctrl + Shift + F
: Find characters (all files)
-
Ctrl + Shift + R
:Replace character (all files)
-
Ctrl + F3
: Jump to the next position of the word under the cursor
-
Ctrl + Shift + N
: Find files and jump
-
Ctrl + F12
:Open file structure
-
Ctrl + Alt + Shift + N
: Find symbols (variables, methods, etc.)
-
Ctrl + Shift + A
: Find action
10. Symbolic Navigation
-
Alt + F7: Find usage
-
Ctrl + B: Jump to the statement
-
Ctrl + Shift + B
: Jump to the declaration class
-
Ctrl + Alt + F7: Show usage
-
Ctrl + U: jump to super method
-
Ctrl + Alt + B: Jump to the implementation method
11. Official website documents
https://www.jetbrains.com/help/idea/reference-keymap-win-default.html
5. Conclusion
This article provides a detailed explanation of the introduction, installation, configuration optimization and shortcut keys of IntelliJ IDEA. The shortcut key definitions refer to the official website documentation and network content of IntelliJ IDEA, and the shortcut keys of IntelliJ IDEA (Windows version) are listed. On this basis, animation demonstrations are provided for more than 90% of the shortcut keys, so that the operation effects can be intuitively seen. Shortcut keys All shortcuts can be found and modified in "Settings | Keymap".