IntelliJ IDEA Common Settings Encyclopedia

The purpose of optimizing the configuration of IDEA is to improve coding efficiency for personalized customization. The following is a personal summary through my usual accumulation and sharing skills on the Internet. There are a lot of article titles, and you can quickly jump through the table of contents.

The basic configuration below is enough to improve the efficiency in the work. After the step-by-step configuration is completed, you can export the settings as a file for reinstallation and restoration in the future. I hope it can help you!

Article Directory

1. Code hints and supplementary features have a feature: case-sensitive

The case of case sensitivity is like this: for example, if we enter stringBuffer in the Java code file, IntelliJ IDEA will not help us with prompts or code supplements, but if we enter StringBuffer, we can perform code prompts and supplements. If you want to be case-insensitive, just change to the None option.
insert image description here

2. Enable the function of automatic import package

insert image description here

3. Set the specified code type to fold or expand by default

A check mark indicates that the type of code is folded by default when the file is opened, and vice versa if the check mark is removed.
insert image description here

4. Modify Ctrl + D to copy the complete content of the selected line number

Before modification, this shortcut key will be used to copy and paste the selected content, but the pasted position is added to the original position, and modified to copy the complete content of the selected lines.
insert image description here

5. Display Memory

The IntelliJ IDEA 14 version does not display the memory usage by default. It does not matter if it is not displayed for a machine with a large memory, but it is better to display it if it is a machine with a small memory. After clicking, part of the memory can be recovered.
insert image description here

6. Set Tab multi-line display

When opening many files, IntelliJ IDEA displays all open file names in a single line by default.
insert image description here

7. Setting can increase the number of recorded files displayed on the Ctrl + E popup layer

insert image description here

8. The default way to open the file

insert image description here

9. Set the soft line break of the file

For codes that are too long horizontally, we can perform soft branch viewing. The branch effect caused by soft branch is set by IntelliJ IDEA, and the essential code has no real branch.
insert image description here

Globally set newlines
insert image description here

10. Group codes vertically or horizontally

Generally, when modifying a large file, some modification content is above the file, and some content is below the file. If you operate back and forth, the efficiency may be very low, and this method can be much better.
insert image description here

11. Set the code inspection level for the current file

IntelliJ IDEA does not have much advantage for editing large files. It is very stuck because it has various checks, which consume a lot of memory and CPU. Therefore, in order to speed up the reading and writing of large files, it is generally temporarily set to None.

  • Inspections is the highest level of inspection, which can check spelling of words, grammatical errors, variable usage, calls between methods, etc.
  • Syntax can check word spelling, simple grammatical errors.
  • None sets no checks.
    insert image description here

12. Set Ctrl + scroll wheel to zoom files and pictures

insert image description here
insert image description here

13. Show line count and method line

insert image description here

14. Select the code to be folded and press Ctrl + Alt + T shortcut keys to select the function of custom folding code area

insert image description here

Before folding:
insert image description here

After folding:
insert image description here

The details of the fold can be viewed by hovering the mouse over the folded description text
insert image description here

15. Bring your own local file history

In addition to simple logging, we can also tag the current version.
insert image description here

Depending on the selected code, view the local history of that piece of code, which saves you the need to view the history of other content in the file. In addition to viewing the history of files, folders can also view the history of changes in individual files.
insert image description here

16. Set your own TODO

insert image description here
insert image description here

17. IDEA default Settings settings

According to the normal setting of the Project process, we set the IDE in the Project state, and these settings will not be saved as a standard IDE setting template, so you still have to reset it next time you open a new Project, for easy operation , through the Default Settings setting, so that the next time you open a new Project, the default Settings will be used.
insert image description here

18. Whether opening a new file with IntelliJ IDEA, or installing a local plug-in, the general function in the pop-up window.

insert image description here

19. In the 2016.2 version, the button pointed by the arrow is added. In the submission list, the files that have not been added to the version control in the project can be displayed, which is convenient for us to check the code when submitting, so as to prevent some files from being missed and not submitted.

insert image description here

20. How does the Intellij Idea tool avoid importing java.utils.* packages in java files and the order of import packages

When the class under a certain package imported in our Java class exceeds the specified number set here, it will be replaced by *.
insert image description here

Sort order of eclipse imported packages:

  • static all other,
  • blank,
  • java.*,
  • blank,
  • javax.*,
  • blank,
  • org.*,
  • blank,
  • com.*,
  • blank,
  • all other imports

21. Set automatic line wrap when the code line width exceeds the limit

When we use the IDE to write code, in order to ensure the readability and elegance of the code, we usually use the code style setting function of the IDE, so that the code part completed by the IDE intelligently or the formatted input code can be output in the expected format. One of the settings is to limit the width of a line of code. Taking IDEA as an example, the default limit is 120. The landlord here is set to 100.

  • Triggered when the code is entered, as the input characters increase, when the code width reaches the boundary, IDEA will automatically wrap the code.
    insert image description here
  • Triggered when formatting Java code to ensure that the code does not exceed the width boundary.
    insert image description here

22. Display call method parameters

insert image description here

There are more parameters for breadcrumb navigation and calling methods, and the parameter names are added. It looks weird. It can be modified as follows.
insert image description here

Breadcrumbs have been replaced with the following locations
insert image description here

23. Set Temporary Run Configuration Limits

By default, when Idea starts, only the last 5 startup items are allowed to be displayed. If necessary, modify as follows:
insert image description here

What I configure here is the global setting. If you need to configure the current project, edit it directly:
insert image description here

24. Hover prompt parameter

insert image description here

25. Startup does not open the project

insert image description here

26. Material Theme theme configuration

insert image description here
insert image description here
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/the_liang/article/details/100119189