This is the 24th day of my participation in Gwen Challenge
preface
IDEA as a necessary development tool for Java development, its powerful often let us underestimate it, today we take time to go over the quick operation of this software.
The IDEA tool selected this time is IDEA 2020, with slight differences between different versions.
First, basic skills
1.1 find
- 1, CTRL + F: text search in the current file
- CTRL + R: Replace the text in the current file
- CTRL + Shift + F: Find text in the project
- CTRL + Shift + R: Replace text in the project
- Shift + Shift: Quick search
- CTRL + N: Find class
- 7. CTRL + Shift + N to find a file
1.2 Jump Switchover
- CTRL + E: Open the most recent file
- CTRL + TAB: Switch files
- 3. CTRL + Alt + left and right arrow keys: Jump to the location of the historical cursor
- 4. Alt + up and down arrow keys: fast switching method
- 5, CTRL + B: jump method definition, implementation
1.3 Coding correlation
- 1. Fast output:
- Fori, sout, PVSM + TAB,.var
- Null: Enter. Null + TAB after the object
- CTRL + J to view these commands for quick code output
- 2. Automatic code:
- CTRL + Alt + O optimize imported packages and classes (remove Spaces)
- CTRL + Alt + T wraps the selected code in either Try{} or if {}
- Alt + / code prompt
- CTRL + O override method
- CTRL + I implementation method
- CTRL + Shift + U Case conversion
- CTRL + Alt + I: Automatically adjusts format indentation
- CTRL + Alt + L: Format code
- If you select multiple rows, TAB can be indented, and TAB + Shift can be retracted
- CTRL + D: Copy the entire line
- CTRL + X: Cut the entire line
- 3, quick selection:
- CTRL + W: Quickly select and gradually expand the range
- CTRL + Alt + J: Quickly select the same text
1.4 Debug reading related
- 1. Reconstruction:
- Shift + F6 rename
- F6 mobile
- F5 copy
- Alt + Delete Deletes data safely
- Shift + Alt + up and down arrow keys: Jump to code location
- 2, the debug:
- Alt + F9: Run to the cursor
- F7: enter
- F8: step
- Shift + F8: Step out
- 3. Reading:
- Close the current window: CTRL + F4
- CTRL + H: Class hierarchy
- CTRL + Shift + F12: Full screen
2. Common Configurations
2.1 Efficient Configuration
- 1. Automatic package guide function and related optimization function
-
2. Adjust the window size by CTRL + sliding the scroll wheel
-
3. TAB displays multiple lines
Effect:
2.2 Basic Configuration
-
1. Change the file encoding to UTF-8. File->settings–>Editor –>File Encodings
-
2. Hide the configuration directory of the development tool, for example. Idea.iml
At the end of file -> Setting ->Editor->File Type -> Ignore file and folders
-
-
Change the background color to an eye protecting color
-
-
4. Configure file templates
Class template configuration:
Method template configuration:
groovyScript("def result=''; def params=\"The ${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {result+= ' * @param ' + params[i] + ((i < params.size() - 1) ? '\\n':'')}; return result", methodParameters())
Copy the code
3. Plug-in configuration
3.1 lombok
Simplified Development configuration
3.2 Alibaba Java Coding Guidelines
Alibaba Java development specification.
3.3 GsonFormatPlus
You can automatically convert JSON strings into Java entity classes,
3.4 Translation
Chinese and English translation, right click translation
3.5 Alibaba Cloud Toolkit
Rapid deployment server, equivalent to xshell and FTP functions
3.6 MyBatis Log Plugin
You can see the SQL in action, which is very useful
3.7 MyBatisCodeHelperPro
Support mapper mutual hop, method automatically generated, code automatically generated XML