Article update log:
2023-08-15 Added prompt for setting Serializable interface
The Using Series records how I use software tools in my daily life. This article is part of the Using Series - Common Settings of IDEA. Due to the company's intranet environment, I find it quite good to use IDEA at work, but I cannot synchronize my settings to my home in time. Therefore, I specifically wrote this series to record the modifications I made to this commonly used IDE during my daily development programming to improve my coding efficiency and enthusiasm. This series will be continuously updated.
First, let me clarify that this article introduces IDEA version 2022.3.2 (Ultimate Edition), and the computer system is Mac OS 12.5 Monterey version.
Almost all settings of IDEA are in the detailed settings menu, and the shortcut key to open the settings menu is ⌘ + ,

Appearance#
First of all, a handy weapon should also be pleasing to the eye.
Theme#
I personally prefer to use a dark theme. After trying many themes, I still like this Xcode-Dark theme the most.

I borrowed this display image from the theme plugin's official website; this pinkish feel is still very nice.

Font#
For programmers, the code they write is like their business card, so a good-looking font is also very necessary.
I had been using a very nice font: JetBrains Mono, which is indeed very good-looking. Below is a display of this font's specific code.

However, I recently discovered another font that fits my aesthetic, which is Fira Code. Here is the display of the same piece of code.

Font settings are in Editor -> Font
.

This mentions a setting for adjusting font size with the mouse; use Ctrl + Mouse Wheel
to set the font size.


System Settings#
Software Related#
Default Startup Options#
Set IDEA's settings for opening projects each time:
- New Window
- Current Window
- Ask, I prefer this

Disable Automatic Updates#
There is no need to check for automatic updates for the IDEA software itself, as updating the entire software can easily introduce compatibility issues. It is recommended not to select this.
Plugin updates can be checked.

Adjust IDEA's Startup Parameters#
Make the IDE run more smoothly.
Find Help -> Edit Custom VM Options
in the menu, and adjust JVM-related parameters such as -Xms
and -Xmx
in the opened idea.vmoptions
file.
-Xms2048m
: Specifies the initial size of the JVM heap memory.-Xmx8192m
: Specifies the maximum value of the JVM heap memory.-XX:+UseConcMarkSweepGC
: Selects the CMS garbage collector as the garbage collector when starting the Java Virtual Machine.-Djava.net.preferIPv4Stack=true
: Indicates that IPv4 addresses should be preferred over IPv6 addresses. This parameter is commonly used in handling network connections, as some older network devices may not support IPv6 addresses. If IPv6 addresses are used by default, it may lead to connection issues. By setting this parameter to true, it ensures that Java prioritizes using IPv4 addresses when handling network connections, thus avoiding connection issues.-Dfile.encoding=UTF-8
: The file encoding uses UTF-8 encoding format.
Project Encoding Related#
Show Line Numbers and Method Separators#

Code Intelligent Prompt Function#
Code prompts and completions have a feature: case sensitivity. It is recommended to uncheck this so that you can get code prompts regardless of whether you input uppercase or lowercase.

Set Project File Encoding to UTF-8#
Sometimes errors in the code may be caused by code encoding, so it is very necessary to unify the encoding format before project development.

Set Java File Header Comment Information#
When we create a new Java file, we inevitably need to write comments at the top of this file to explain some basic information about it, such as the creator, creation time, description, etc. However, manually entering this every time is cumbersome, so IDEA provides templates for creating files, and we can customize our own templates.
Since I am a Java developer, I only set up templates for class
, interface
, and Enum
. The ${USER}
in the comments is a preset variable, and other variables can be viewed on the official website.

Set Automatic Compilation#
The benefits of setting automatic compilation:
- Saves time, no need for manual compilation.
- Can promptly discover syntax errors in the code, avoiding issues when running the code.

Set Maven's Reload Operation#
When the pom.xml file changes, it will automatically trigger Maven's Reload operation.

Set Prompt for Implementing Serializable Interface#
When a class implements the Serializable interface, IDEA prompts to add serialVersionUID.
- Open settings.
- Search for
serialVersionUID
. - Check
Serializable class without "serialVersionUID"
. - Then, place the cursor on the class that implements the
Serializable
interface, and pressOption + Enter (Mac)
/Alt + Enter (Win)
to automatically addserialVersionUID
.
This article will continue to be updated as long as I am still using the IDEA software ♪(・ω・)ノ