What tricks does Intellij IDEA have?

The full name of IDEA is IntelliJ IDEA, which is an integrated environment for java language development. IntelliJ is recognized as one of the best java development tools in the industry, especially in intelligent code assistants, automatic code prompts, refactoring, J2EE support, Ant, JUnit, CVS integration, Features such as code review, innovative GUI design , etc. can be said to be extraordinary.
Idea download address: jetbrains.com/idea
Here are a few practical tips of IDEA, which can improve work efficiency in minutes after learning.
1. IDEA opens multiple projects in the form of a new window
insert image description here
2. Remove the navigation bar
Remove the navigation bar, because it is not used much at ordinary times.
insert image description here
You can remove the red navigation bar to make IDEA look neater. Use alt+v°, and then remove the Navigation bar. After removing the navigation bar, if you still need to use it occasionally, you can use alt+home to temporarily display the navigation bar.
3. How to find a directory
After using ctrl+shift+n, use /, and then enter the name of the directory. insert image description here
4. Use shortcut keys to move the dividing line

Assuming the following scenario, a certain class name is blocked in a certain part in the project view.

insert image description here
You want to see the name of the class in its entirety, what to do. Generally, the mouse is used to move the dividing line, but this is too inefficient. You can use alt+1 to position the mouse focus in the project view, and then directly use ctrl+shift+left and right arrows to move the dividing line.
5. ctrl+shift+enter is not just used to add a semicolon to the end of the line.
The ctrl+shift+enter actually means to end your code, not just to add a semicolon to the code. For example:

insert image description here
For this code, we also need to add curly braces to the i statement to compile it. At this time, you can directly enter ctrl+shift+enter, and IDEA will automatically finish it for you and add curly braces.
6. Quickly assign values ​​to new objects
Add .var to the new object to achieve quick assignment, the effect is as follows:
insert image description here
7. Quick try...catch
If we need to throw an exception, just .try, the effect is as follows
Next: insert image description here
8. Set IDEA's smart prompt to ignore capitalization.
File - Settings - Editor -General - CodeCompletion
Match case, uncheck the box in front of it, and save.
insert image description here
9. Quickly generate and print the main method
The main method can be quickly generated with the psvm command. The printing method System.out.println can be quickly generated with the sout command. The effect of the combination of the two commands is as follows:
insert image description here
10. The code prompt is not case-sensitive
Settings -> Editor -> General -> CodeCompletion
insert image description here
11. CTRL + sliding the scroll wheel to adjust the window display size
Settings -> Editor -> General -> Change fontsize (Zoom) with Ctrl+Mouse wheel
insert image description here
12. Automatic package import function and related optimization functions
Settings -> Editor -> General -> Auto Import
insert image description here

Supongo que te gusta

Origin blog.csdn.net/Tiam_cr/article/details/131978787
Recomendado
Clasificación