Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Explanation of common settings of IntelliJ IDEA

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains the "explanation of the common settings of IntelliJ IDEA". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn the "explanation of common settings of IntelliJ IDEA".

Description

IntelliJ IDEA has a lot of user-friendly settings that we have to explain separately, and because these user-friendly settings make us IntelliJ IDEA loyal fans more determined to use it and share it.

Common settin

IntelliJ IDEA's code hints and supplements have one feature: case sensitivity. As shown in note 1 above, First letter is case-sensitive by default.

The case of case sensitivity is like this: for example, typing stringBuffer IntelliJ IDEA in a Java code file will not help us with hints or code additions, but if we enter StringBuffer, we can do code hints and additions.

If you want to be case-insensitive, change to the None option.

As shown in the Gif above, this feature is used to quickly set the code review level. Personally, I usually use this feature when editing large files. IntelliJ IDEA for editing large files does not have much advantage, very stuck, the reason is that it has a variety of checks, which is very memory-consuming and CPU, so in order to speed up the reading and writing of large files, I usually temporarily set it to None.

Inspections is the highest level of checking, which can check word spelling, syntax errors, variable use, calls between methods, and so on.

Syntax can check the spelling of words and simple grammatical errors.

None does not set checks.

As shown in figure 1 and 2 above, the default IntelliJ IDEA is that the automatic import package is not enabled.

Check label 1, and IntelliJ IDEA will automatically optimize the imported packages when we write the code, such as automatically removing some unused packages.

Check the label 2 option and IntelliJ IDEA will automatically import the packages we need when we write the code. But for those packages with the same name, they still need to be imported manually by Alt + Enter, and IntelliJ IDEA is not smart enough to judge for us.

As shown in note 1 above, when the number of classes under a package imported into our Java class exceeds the specified number set here, it will be replaced with the * sign.

As shown in the Gif above, IntelliJ IDEA collapses empty packages by default, so that the package names are concatenated. But some people do not like this structure, like the whole structure is a complete tree, so we can uncheck the box in the demonstration.

As shown in figure 1 above, IntelliJ IDEA has a state called power saving mode, and when turned on, IntelliJ IDEA turns off functions such as code checking and code hints. So generally I would also think that this is a kind of reading mode, if you encounter a sudden code file that cannot be checked and prompted during the development process, you can see if this function is enabled here.

As shown in the Gif above, when we press Ctrl + Shift + N to open a file, we can directly navigate to the number of lines in the file. Generally speaking, when we adjust CSS, when we find a null pointer exception according to the console, the speed of using this method will be relatively high.

As shown in the red circle marked above, we can set the default collapse or expansion of the specified code type. Check the box to indicate that the code of this type is collapsed by default when the file is opened, and uncheck it and vice versa.

As shown in the Gif above, IntelliJ IDEA supports grouping code vertically or horizontally. Generally, when making changes to a large file, some changes are above the file, and some are under the file. If you operate back and forth, the efficiency may be very low. Using this method can be much better. Of course, as long as your browser resolution is high enough.

As shown in the arrow above, IntelliJ IDEA enables spell checking by default, and some people may have obsessive-compulsive disorder and do not like to see wavy lines under words, so you can uncheck this check box. But I personally suggest that this should not be turned off, because spell checking is a good feature, and when everyone's names are standard words, it can easily help us find the Bug caused by spelling errors from time to time.

As shown in the Gif above, we can drag and shift the child window of the component window, sometimes the setting is too much or the effect is not satisfactory, then we need to click this button to restore the window.

As shown in the figure above Gif, before the Ctrl + D shortcut key is modified, this shortcut key will be used to copy and paste the selected content, but the location of the paste is added in the original position, I personally do not like this style, I like to copy the complete content of the selected lines, so the modified effect is shown in the figure Gif above.

As shown in the figure Gif above, the default Ctrl + space shortcut key is the basic code hint and supplementary shortcut key, but because this shortcut key in our Chinese system is basically occupied by the input method, we find that no matter how we press it, there is no prompt code effect, and this is the reason. I personally suggest changing this shortcut to Ctrl + comma.

As shown in the Gif above, IntelliJ IDEA version 14 does not show memory usage by default, and it doesn't matter if it doesn't show it for machines with large memory, but it's best to show it for machines with small memory. As shown in the above figure, you can reclaim part of the memory after clicking.

As shown in note 1 above, when opening many files, IntelliJ IDEA displays all open filenames Tab on a single line by default. But my personal habit now is to use multiple lines, which are more efficient than single lines, because a single line will hide part of the Tab beyond the interface, so it is not convenient to find files.

As shown in the figure Gif above, the default IntelliJ IDEA single-line comment for Java code is to put the slash at the beginning of the number of lines. I personally think that such a single-line comment is very ugly and the whole code style is very ugly, so it is generally set to the two slashes of a single-line comment to follow at the head of the code.

As shown in the Gif above, the first curly braces of the default Java code do not wrap, but some people like curly braces with symmetrical structures, which can be set up. I do not reject this function, I personally quite like this symmetrical structure, but because this structure will occupy the line, making the number of file lines more, so although I personally like it, I do not set it this way.

As shown in figure 1 above, if you are slow in the make or rebuild process, you can increase this heap memory setting. Generally speaking, it does not matter if the machine setting with large memory is above 1500.

As shown in note 1 above, when this option is checked, when you start IntelliJ IDEA, the last used project will be opened by default. This feature works well if you have only one project, but if you have more than one project, it is recommended to close it so that you can select a recently opened project when you start IntelliJ IDEA.

As shown in the red circle above, this option sets how to open a project window when we have already opened a project window.

Open project in new window opens with a new window each time.

Open project in the same window replaces the currently open project each time so that there is only one project window on the desktop.

Every time Confirm window to open project in pops up a prompt window, let's choose to open or replace the current project window with a new window.

As shown in the Gif above, we can do soft branch view for code that is too long horizontally. The branch effect caused by soft branch is set by IntelliJ IDEA, and the essential code is that there is no real branch.

As shown in the arrow above, this setting increases the number of record files displayed in the Ctrl + E pop-up layer.

As shown by the arrow above, this setting can increase the number of Tab files opened. When we open more than that number of files, the files that we opened earlier will be replaced by the newly opened files.

As shown in note 1 above, the suffix type file for this area will be opened as label 2 in IntelliJ IDEA.

As shown in figure 3 above, we can ignore some suffixed files or folders in IntelliJ IDEA. For example, I usually ignore the .idea folder.

As shown in the Gif above, when we set the Pinned Mode property of the component window, when we switch to another component window, the window that has set this property will not be automatically hidden.

As shown in the Gif above, we can add some files to our favorites, and then we can see our favorite files in the favorites component window.

As shown in the Gif above, we can use the Alt + F1 + 1 shortcut key to locate the location of the current file in the Project component window.

As shown in the Gif above, we can check this setting and add Ctrl + mouse wheel shortcuts to control the font size of the code.

As shown in the Gif above, we can check this setting and add the Ctrl + mouse wheel shortcut to control the size of the picture.

As shown in the red circle above, the default IntelliJ IDEA does not check Show line numbers to show the number of lines, but I suggest that this should be checked generally.

As shown in the red circle above, the default IntelliJ IDEA does not check the Show method separators display method line, which helps us to distinguish the method, so it is also recommended to check it.

As shown in the Gif above, we select the code to be collapsed and press the Ctrl + Alt + T shortcut key to select the custom collapse code region function.

As shown in the Gif above, when we edit a file, we automatically navigate to the Project component window where the current file is located.

As shown in the Gif above, IntelliJ IDEA provides us with local file history even if our project does not use version control. In addition to simple records, we can also tag the current version.

As shown in the Gif above, we can also view the local history of this code based on the selected code, thus eliminating the need to view the history of other contents in the file. In addition to viewing the history of files, folders can also view the history of changes in individual files.

As shown in the Gif above, IntelliJ IDEA comes with a code review function that can help us analyze some simple syntax problems and some code details.

As shown in the Gif above, IntelliJ IDEA comes with the simulation request tool Rest Client, which is very useful for simulating requests during development.

Thank you for your reading, the above is the content of "explaining the common settings of IntelliJ IDEA". After the study of this article, I believe you have a deeper understanding of the common settings of IntelliJ IDEA to explain this problem, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report