Boost Your Java Productivity: Essential IntelliJ IDEA Tips & Shortcuts
This guide walks Java developers through high‑efficiency IntelliJ IDEA configurations, essential daily shortcuts, powerful live templates, advanced debugging techniques, and a curated set of plugins to dramatically improve coding speed and code quality.
Preface
During a department‑organized training for new hires on IntelliJ IDEA, many newcomers were found using only basic features, missing out on numerous productivity‑boosting tricks. This article shares those tips to help both beginners and experienced users get more out of the IDE.
High‑Efficiency Configuration
1. Case‑Insensitive Code Completion
Settings → Editor → General → Code Completion
(In older versions set Case sensitive completion to None.)
2. Auto‑Import and Related Optimizations
Settings → Editor → General → Auto Import
3. Ctrl + Mouse Wheel to Adjust Font Size
Settings → Editor → General → Change font size (Zoom) with Ctrl+Mouse wheel
After enabling, you can zoom the editor font with Ctrl + scroll.
4. Show All Tabs in Multiple Rows
Window → Editor Tabs → Tabs Placement, uncheck Show Tabs In Single Row
Resulting layout is shown below.
5. Show Line Numbers
Settings → Editor → General → Appearance → check Show Line Numbers
Essential Daily Shortcuts (★★)
Search
Navigation & Switching
Coding‑Related
Code Reading
Version Control
Coding Efficiency (★★)
File and Code Templates
Settings → Editor → File and Code Template
Here you can view all built‑in file templates and set file headers.
Result after configuration:
Live Templates
IntelliJ IDEA provides powerful live templates such as sout for System.out.println(); and psvm for a public static void main method.
These templates are managed under Settings → Editor → Live Templates.
Custom Templates
IDEA also allows you to create your own live templates.
Create a custom template library
Create personalized code templates
Other Handy Shortcuts
Ctrl + Alt + T (Surround With)
Ctrl + Alt + Tquickly wraps selected code with a chosen construct.
Local History
IDEA’s built‑in local history feature helps you safely experiment with code.
Debugging & Source Reading (★★★)
View Modes
IDEA offers two special view modes:
Presentation Mode – ideal for code reviews.
Distraction Free Mode – focuses on coding without UI clutter.
Debugging Features
1. Conditional Breakpoints
Set breakpoints with custom conditions to speed up debugging.
2. Force Return
Force a method to return a specific value directly from the stack.
3. Simulate Exception
Force an exception to be thrown at a breakpoint, useful for testing error handling.
4. Evaluate Expression
Modify variable values on the fly during debugging.
Plugins
Installation
File → Settings → Plugin
Search and install plugins directly from the built‑in repository, or download from the official JetBrains plugin site.
Recommended Plugins
Commonly used plugins include:
Alibaba Java Coding Guidelines
Enforces Alibaba’s Java coding standards.
FindBugs
Static code analysis for bug detection.
PMD
Another static analysis tool.
InnerBuilder
Quickly generates builder pattern code.
Lombok Plugin
Supports Lombok annotations.
Maven Helper
Assists with Maven dependency management and conflict analysis.
Rainbow Brackets
Colors matching brackets for better readability.
String Manipulation
Provides shortcuts for string operations (e.g., Ctrl+W, Alt+J).
Translation
Translates selected text, useful when reading source code.
GenerateAllSetter
Key Promoter X
Shows keyboard shortcuts for mouse actions.
GenerateSerialVersionUID
Press Alt + Insert to quickly generate SerialVersionUID.
GsonFormat
RestfulToolkit
Quick navigation to RESTful APIs (Ctrl/Cmd + ? or Ctrl + Alt + N).
Displays RESTful interface structures.
Simple HTTP request tool.
Material Theme UI
Personal favorite UI theme.
MyBatis Log Plugin
Restores full SQL statements from MyBatis logs for clearer inspection.
Free MyBatis
A free MyBatis plugin.
Author: Richard_Yi https://segmentfault.com/a/1190000019977265
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Interview Crash Guide
Dedicated to sharing Java interview Q&A; follow and reply "java" to receive a free premium Java interview guide.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
