IntelliJ Idea Common setting explanation

Source: Internet
Author: User
Description

IntelliJ idea has a lot of humanized settings that we have to explain individually, and because of these humanized settings let us these IntelliJ idea die faithful use it and share it. Common Settings

IntelliJ Idea's code hints and supplemental features have one feature: case sensitive. As shown in callout 1 above, the default is the case of the top letter. Case sensitive: For example, if we enter StringBuffer IntelliJ idea in a Java code file, we will not be prompted or added to the code, but if we enter StringBuffer we can make 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 code-checking levels. I personally usually use this feature when editing large files. IntelliJ idea for editing large files does not have much advantage, is very card, because it has a variety of checks, which is very memory and CPU, so in order to be able to speed up the reading of large files, I will generally temporarily set to None. Inspections for the highest level check, you can check the spelling of words, grammatical errors, variable use, call between methods and so on. Syntax can check the spelling of words, simple grammatical errors. None does not set the check.

As shown in the figure 1 and 2 above, the default IntelliJ idea is not to turn on the automatic import package. With the 1 option checked, IntelliJ idea will automatically help us optimize the imported packages when we write the code, such as automatically removing some of the useless packages. With the 2 option checked, IntelliJ idea will automatically help us import the packages we need when we write the code. But for those packages with the same name, you need to manually Alt + Enter to import, IntelliJ idea is not smart enough to judge us.

As shown in callout 1 above, when a class in our Java class imports a package that exceeds the specified number set here, it is replaced with a * number.

As shown in the Gif above, IntelliJ idea collapses empty packets by default, which can cause the package name to be linked together. But some people do not like this structure, like the whole structure is complete tree, so we can remove the check box in the demo.

As shown in Figure 1 above, IntelliJ idea has a state called power-saving mode, after which IntelliJ idea turns off code checking and code hints. So in general I would also think that this is a reading mode, if you encounter in the development process of sudden code files can not be checked and prompted to see if there is open this feature.

As shown in the Gif above, when we press Ctrl + Shift + N to open a file, we can navigate directly to the number of rows in the file. In general, we are adjusting the CSS, depending on the console to find null pointer anomalies, the use of this method will be relatively high speed.

As shown in the red circle above, we can set the default folding or expansion of the specified code type, and check that the code for that type is folded by default when the file is opened, minus the tick or vice versa.

As shown in the Gif above, IntelliJ idea supports the vertical or horizontal grouping of code. Generally in the large file modification, some changes in the file, some content in the file below, if the back and forth operation may be very low efficiency, this method can be much better. Of course, the premise is that your browser resolution should be high enough.

As shown in the arrow above, IntelliJ idea is to turn on the word spell check by default, and some people may have obsessive-compulsive disorder do not like to see the word below a wavy line, you can remove the tick. But I personally suggest this or not, because the spell checker is a good feature, and when everyone's name is standard, it's easy to help us find the bugs that the code is causing by spelling mistakes.

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

As shown in the Gif above, before you make any changes to Ctrl + D shortcuts, this shortcut will be used to copy and paste the selected content, but the sticky position is supplemented in the original position, I personally do not like this style, I like to copy the selected number of lines complete content, so the modified, modified effect as above Gif Demo.

As shown in the Gif above, the default Ctrl + SPACEBAR shortcuts are the basic code hints, supplemental shortcuts, but because our Chinese system basic this shortcut key is occupied by the input method, so we found that no matter how the press is not prompted code effect, the reason is here. I personally recommend that you modify this shortcut key to Ctrl + comma.

As shown in the Gif above, the IntelliJ idea 14 version of the default is not to show memory usage, for large memory machines do not show it does not matter, but if the memory is small machine is best to display. As shown in the illustration above, you can recycle some of the memory after clicking.

As shown in Figure 1 above, when you open a lot of files, IntelliJ idea defaults to display all open file name Tab lines. But my personal current habit is to use more than one line, more efficient than a single line, because a single line will hide more than the interface section Tab, so find files inconvenient.

As shown in the Gif above, the default IntelliJ idea for a single-line comment on Java code is to put the backslash of the annotation at the very beginning of the number of rows, I personally feel that such a single-line comment is very ugly, the entire code style is ugly, so generally set to a single line of comments two slashes followed in the head of the code.

As shown in the Gif above, the first curly braces for the default Java code are not wrapped, but some people like the curly braces of the symmetric structure to make this setting. For this feature I do not reject, I personally also like this symmetric structure, but because this structure will occupy the line, so that the number of file lines, so although I personally like, but also do not set.

As shown in the figure 1 above, if you are slow in the make or rebuild process, you can increase this heap memory settings, the general large memory machine setting of more than 1500 does not matter.

As shown in callout 1 above, when you start IntelliJ idea when you check this option, the last used item is opened by default. This feature works well if you have only one project, but if you have multiple projects, it's a good idea to turn it off, so you can choose a recently opened item when you start IntelliJ ideas. As shown in the red circle above, this option is to set how you want to open a project window when we have opened a project window. The Open Project in New window is opened each time with a new windows. The open project in the same window replaces the currently open project each time so that there is only one Project window on the desktop. Confirm window to open project in each pop-up prompt, let's choose to open or replace the current project window with a new window.

As shown in the Gif above, we can have a soft branch view of the code that is too long for the landscape. The branch effect caused by the soft branch is IntelliJ idea set, and the essential code is no real branch.

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

As shown in the arrow above, this setting increases the number of open file tabs, and when we open a file that exceeds that number, the file opened earlier will be replaced with a new opening.

As shown in callout 1 above, the suffix type file for this area is opened in IntelliJ idea with callout 2. As shown in Figure 3 above, we can ignore some suffix files or folders in IntelliJ idea, for example, I usually ignore the. Idea folder.

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

As shown in the Gif above, we can add some files to our Favorites folder, and then we can view our favorites in the Favorites Component window.

As shown in the Gif above, we can position the current file in the Project component window by Alt + F1 + 1 shortcut keys.

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

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

As shown in the red circle above, the default IntelliJ idea is not to check show lines numbers display the number of rows, but I suggest that this should be checked. As shown in the red circle above, the default IntelliJ idea is not to check show methods separators Display method lines, this line helps us to separate the method, so it is recommended to be selected.

As shown in the Gif above, we selected the code to be folded to press Ctrl + ALT + T shortcut keys to select the custom Collapse code area feature.

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

As shown in the Gif above, IntelliJ idea also gives us a local file history, even if our project does not use version control functionality. In addition to the simple records, we can also label the current version.

As shown in the Gif above, we can also view the local history of the code based on the selected code, which eliminates the history of viewing other content in the file. In addition to viewing history for files, folders can also view the history of changes in individual files.

As shown in the Gif above, IntelliJ idea has a code check feature that can help us analyze some simple syntax problems and some code details.

As shown in the Gif above, IntelliJ idea comes with the mock request tool Rest Client, which is very useful for simulating requests at development time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.