preface
Programmers are religious about ides, often making waves about who is the best IDE, and I used to be one of them.
Then I met IDEA, and it’s been with me for the rest of my life.
IDEA is undoubtedly the most powerful Java development tool out there, but most people don’t use it to the extreme, and many useful configurations, plug-ins, and tricks are ignored. Like JDK8’s new feature, you know it’s there and you don’t use it, but you know what’s real once you’ve used it.
All the following common configurations of the mind map, rich content, mind map with Ctrl+F search taste taste. Like it before you look at it, make it a habit
IDEA Software Settings page
Settings are used to configure software properties, such as font, theme, and background image plug-ins.
How do I open the Settings page
Settings Page structure details
structure
- Appearance & Behavior
- Keymap shortcuts
- Editor Editor Settings
- The Plugins plugin
- Version Control Version Control
- A) Build B) execute C) deploy D) execute
- Languages & Frameworks
- The Tools tool set
Xx common Settings of IDEA
Most of the Settings are included in the effect schematic, article structure: setting method -> effect schematic
Appearance & Behavior
Set the theme
Currently, there are two themes in my IDEA: Darcula and IntelliJ.
- Darcula is the mysterious black theme. I love black
- IntelliJ white theme
Set menu fonts
Keymap shortcuts
Set the key as the Eclipse shortcut key
If you can’t get over Eclipse, you can use its keys, which I don’t recommend either. It feels awkward.
Modify shortcut keys
Don’t change too many shortcuts at once
- Adding a keyboard Shortcut is essentially changing the current key position
- Add Mouse Shortcut
- Add Abbreviation
- Remove Ctrl+Alt+Shift+S Remove change shortcut key
View the functions of shortcut keys
Search for shortcut keys by shortcut keys. For example, if you don’t know what Ctrl+F means, you can search by this function
Editor Editor Settings
The Settings in the Editor are some of the most frequently used Settings, such as fonts in the edit area, auto-guide packages, comment generation, etc. That’s where you write code
Editor-General
Set the mouse wheel to scroll to change the font size
Once set, you can adjust the font size of your code by Ctrl+ scroll
Set mouse hover prompt
Hover hints are a very useful feature, and the effect is as follows
Set automatic packet guide
- Add unambiguous imports on the fly: Add explicit imports
- Optimize imports on the fly: Automatically Optimize imported packages for us
Sets the display line number and separator between methods
Results the following
Ignore case hints
- Ctrl + Alt + S opens the Settings screen (or file-Settings)
- Enter Completion in the search box to locate the Code Completion function item
- On the right configuration page, select All Letters
- Remove √ from Match Case on the right configuration screen.
- IntelliJ IDEA’s code hints and supplements feature one feature: case sensitivity. First letter is case sensitive by default, as shown in the annotation above.
- Here’s how case-sensitive it is: If we type stringBuffer in a Java code file, IntelliJ IDEA doesn’t hint or supplement by default, but if we type stringBuffer it does.
Set the action to cancel the single line display of Tabs
What is a single line display
How do I set it to multiple lines?
Results the following
Editor-Font
Modifies the font in the current theme code edit area
The default font, font size, and line spacing can all be set separately
Editor-Color Scheme
Modifies the font of console output for the current theme
Modify the font color of comments in your code
Editor-Code Style
Set the number of imports to exceed the specified number*
Editor-File and Code Template
Modify the document comment information for the class header
Results the following
Editor – File Encodings
Set the project file encoding
Transparent native-to-ASCII conversion Transparent native-to-ASCII conversion is used to convert ASCII data. This parameter must be checked otherwise the comments in the Properties file will not be displayed in Chinese.
Sets the encoding of the current source file
Encoding changes for individual files can also be made by clicking on the encoding Settings area in the lower right corner. If the code content contains Chinese text, the above action selection will pop up. Among them:
- Reload means to Reload with a new code, the new code will not be saved to the file, reopen this document, the old code is still the same.
- Convert means that the new encoding is converted, the new encoding is saved to a file, and the file is reopened, whatever the new encoding is.
- Contains Chinese code files, after Convert may make Chinese into garbled, so please do a good backup before converting, otherwise there may be a conversion process into garbled, unable to restore.
Build, Execution, Deployment
Setting up automatic compilation
Intellij Idea is not automatically compiled by default. It is compiled only when the project is running. Eclipse is automatically compiled by default.
What is the effect of not compiling automatically? These are hello. Java and the compiled class file
Modify the Java source code, because it does not automatically compile, so the class file is not changed
IDEA mode is compiled at runtime, so we run the main function and see the following results
Let’s set up automatic compilation to see what happens
IDEA Settings are automatically compiled
Autocompile effect modifies source code
Wait a moment and open the class file to see the following effect
other
Set to power saving mode
As shown above, IntelliJ IDEA has a state called power Saving mode, which turns off features like code checking and code prompting. Therefore, it can also be considered as a reading mode. If you encounter a sudden code file cannot be checked and prompted during development, you can check to see if this function is enabled here.
Set up a split screen display of code
Results the following
You can also add split-screen shortcuts
Background Settings
- Double-click Shift in IDEA to display the search box enter: Set Background Image Click Set Background Image
2. Select the path of the image you want to add, set the transparency, and click OK to view the effect
Results the following
IDEA Current Project Structure is set to Project Structure
Project structure configuration is the configuration of the current module, only for the current module, such as Jar packages, package structure, source folder, output path, dependencies, and project build information.
How to open the Project Structure page
Project Structure page Structure explanation
project
Modules
You can view information about each submodule
Artifacts
IDEA with package configuration, sometimes there is a problem with package using IDEA, which cannot run when deployed in Tomcat. You can pack it again.
Facets
Information about the current project configuration file
Modify the default IDEA Settings
conclusion
The above is my summary of all the common configuration of IDEA development, if this article is helpful to you, don’t forget to bookfavorites support some.
Please keep an eye on the plugin for IDEA and some tips to use.